|
rippled
|
Tracks program uptime to seconds precision. More...
#include <UptimeClock.h>

Classes | |
| struct | update_thread |
Public Types | |
| using | rep = int |
| using | period = std::ratio< 1 > |
| using | duration = std::chrono::duration< rep, period > |
| using | time_point = std::chrono::time_point< UptimeClock > |
Public Member Functions | |
| UptimeClock ()=default | |
Static Public Member Functions | |
| static time_point | now () |
Static Public Attributes | |
| static constexpr bool | is_steady = std::chrono::system_clock::is_steady |
Static Private Member Functions | |
| static update_thread | start_clock () |
Static Private Attributes | |
| static std::atomic< rep > | now_ {0} |
| static std::atomic< bool > | stop_ {false} |
Tracks program uptime to seconds precision.
The timer caches the current time as a performance optimization. This allows clients to query the current time thousands of times per second.
Definition at line 18 of file UptimeClock.h.
| using ripple::UptimeClock::rep = int |
Definition at line 21 of file UptimeClock.h.
| using ripple::UptimeClock::period = std::ratio<1> |
Definition at line 22 of file UptimeClock.h.
Definition at line 23 of file UptimeClock.h.
Definition at line 24 of file UptimeClock.h.
|
explicitdefault |
|
static |
Definition at line 48 of file UptimeClock.cpp.
|
staticprivate |
Definition at line 26 of file UptimeClock.cpp.
|
staticconstexpr |
Definition at line 25 of file UptimeClock.h.
|
staticprivate |
Definition at line 33 of file UptimeClock.h.
|
staticprivate |
Definition at line 34 of file UptimeClock.h.