rippled
|
Tracks program uptime to seconds precision. More...
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 37 of file UptimeClock.h.
using ripple::UptimeClock::rep = int |
Definition at line 40 of file UptimeClock.h.
using ripple::UptimeClock::period = std::ratio<1> |
Definition at line 41 of file UptimeClock.h.
Definition at line 42 of file UptimeClock.h.
Definition at line 43 of file UptimeClock.h.
|
explicitdefault |
|
static |
Definition at line 63 of file UptimeClock.cpp.
|
staticprivate |
Definition at line 41 of file UptimeClock.cpp.
|
staticconstexpr |
Definition at line 44 of file UptimeClock.h.
|
staticprivate |
Definition at line 52 of file UptimeClock.h.
|
staticprivate |
Definition at line 53 of file UptimeClock.h.