Helper class for calculating remaining time.
More...
#include <remaining_time_counter.hpp>
|
| using | time_point = std::chrono::steady_clock::time_point |
| |
| using | duration = std::chrono::steady_clock::duration |
| |
Helper class for calculating remaining time.
Usage example:
do
{
some_task( time_counter.remaining() );
}
while( time_counter );
- Since
- v.5.5.16
◆ duration
◆ time_point
◆ remaining_time_counter_t()
| so_5::details::remaining_time_counter_t::remaining_time_counter_t |
( |
duration |
remaining | ) |
|
|
inline |
◆ operator bool()
| so_5::details::remaining_time_counter_t::operator bool |
( |
| ) |
const |
|
inline |
- Returns
- true if m_remaining is greater than duration::zero().
◆ remaining()
| duration so_5::details::remaining_time_counter_t::remaining |
( |
| ) |
const |
|
inline |
◆ update()
| void so_5::details::remaining_time_counter_t::update |
( |
| ) |
|
|
inline |
◆ m_last_time
| time_point so_5::details::remaining_time_counter_t::m_last_time |
|
private |
- Note
- This member in not declared as const to allow reassignment for remaining_time_counter_t object. Like in such cases:
do
{
do_something();
if( needs_restart )
else
counter.update();
}
while( counter );
◆ m_remaining
| duration so_5::details::remaining_time_counter_t::m_remaining |
|
private |
The documentation for this class was generated from the following file: