OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::resetting_timeout Class Reference

Specialization of timeout that resets when tested for expiration. More...

#include <eagine/timeout.hpp>

Public Member Functions

 operator bool () noexcept
 Indicates if expired and if it is resets the timeout.
 
 timeout () noexcept
 Default construction. Saves current time. Immediately expires. More...
 
 timeout (_clock::duration duration, _clock::duration initial) noexcept
 Construction from the default and initial timeout duration. More...
 
 timeout (_clock::duration duration, nothing_t) noexcept
 Construction from the default and zero initial timeout duration. More...
 
 timeout (_clock::duration duration) noexcept
 Construction from the default duration. More...
 
template<typename R , typename P >
 timeout (std::chrono::duration< R, P > duration) noexcept
 Construction from the default duration. More...
 
- Public Member Functions inherited from eagine::timeout
 timeout () noexcept
 Default construction. Saves current time. Immediately expires. More...
 
 timeout (_clock::duration duration, _clock::duration initial) noexcept
 Construction from the default and initial timeout duration. More...
 
 timeout (_clock::duration duration, nothing_t) noexcept
 Construction from the default and zero initial timeout duration. More...
 
 timeout (_clock::duration duration) noexcept
 Construction from the default duration. More...
 
template<typename R , typename P >
 timeout (std::chrono::duration< R, P > duration) noexcept
 Construction from the default duration. More...
 
auto reset () noexcept -> auto &
 Resets the timeout using the previously specified duration.
 
auto reset (_clock::duration duration, _clock::duration initial) noexcept -> auto &
 Resets the timeout using the specified duration values.
 
auto reset (_clock::duration duration, nothing_t) noexcept -> auto &
 Resets the timeout using the specified duration values. More...
 
auto reset (_clock::duration duration) noexcept -> auto &
 Resets the timeout using the specified duration value. More...
 
auto elapsed_time () const noexcept
 Returns the time since reset as clocks duration type.
 
auto is_expired () const noexcept -> bool
 Indicates if the timeout is expired. More...
 
 operator bool () const noexcept
 Indicates if the timeout is expired. More...
 
auto period () const noexcept -> auto &
 Returns the timeout period. More...
 

Detailed Description

Specialization of timeout that resets when tested for expiration.

See also
timeout
time_measure

Member Function Documentation

◆ timeout() [1/5]

eagine::timeout::timeout
inlinenoexcept

Default construction. Saves current time. Immediately expires.

Postcondition
is_expired()

◆ timeout() [2/5]

eagine::timeout::timeout
inlinenoexcept

Construction from the default duration.

See also
reset
period

◆ timeout() [3/5]

eagine::timeout::timeout
inlinenoexcept

Construction from the default and initial timeout duration.

See also
reset
period

◆ timeout() [4/5]

eagine::timeout::timeout
inlinenoexcept

Construction from the default and zero initial timeout duration.

See also
reset
period

◆ timeout() [5/5]

template<typename R , typename P >
eagine::timeout::timeout ( typename R  ,
typename P   
)
inlinenoexcept

Construction from the default duration.

See also
reset
period

The documentation for this class was generated from the following file:

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).