|
roo_time
API Documentation for roo_time
|
Represents an instant relative to process/boot start time. More...
#include <roo_time.h>
Public Member Functions | |
| Uptime () | |
| Constructs zero uptime value. | |
| Uptime (const Uptime &other) | |
| Copy constructor. | |
| Uptime (const volatile Uptime &other) | |
| Copy constructor for volatile sources. | |
| Uptime & | operator= (const Uptime &other) |
| Assignment operator. | |
| Uptime & | operator= (const volatile Uptime &other) |
| Assignment operator for volatile sources. | |
| int64_t | inMicros () const |
| Returns uptime in microseconds. | |
| int64_t | inMillis () const |
| Returns uptime in milliseconds. | |
| int64_t | inSeconds () const |
| Returns uptime in seconds. | |
| int64_t | inMinutes () const |
| Returns uptime in minutes. | |
| int64_t | inHours () const |
| Returns uptime in hours. | |
| Uptime & | operator+= (const Duration &i) |
| Adds duration to this uptime. | |
| Uptime & | operator-= (const Duration &i) |
| Subtracts duration from this uptime. | |
Static Public Member Functions | |
| static const Uptime | Now () |
| Returns current monotonic process uptime. | |
| static const Uptime | Start () |
| Returns uptime value at process start. | |
| static const Uptime | Max () |
| Returns the maximum representable uptime value. | |
Friends | |
| Uptime | operator+ (const Uptime &u, const Duration &i) |
| Returns uptime shifted by duration. | |
| Uptime | operator- (const Uptime &u, const Duration &i) |
| Returns uptime shifted backwards by duration. | |
| Uptime | operator+ (const Duration &i, const Uptime &u) |
| Returns uptime shifted by duration. | |
Represents an instant relative to process/boot start time.
Stored with microsecond precision and 64-bit range. May not include sleep time on some platforms.
Definition at line 444 of file roo_time.h.
|
inline |
Constructs zero uptime value.
Definition at line 456 of file roo_time.h.
|
inline |
Copy constructor.
Definition at line 459 of file roo_time.h.
|
inline |
Copy constructor for volatile sources.
Definition at line 462 of file roo_time.h.
|
inline |
Returns uptime in hours.
Definition at line 489 of file roo_time.h.
|
inline |
Returns uptime in microseconds.
Definition at line 477 of file roo_time.h.
Referenced by roo_time::operator!=(), roo_time::operator-(), roo_time::operator<(), roo_time::operator<=(), roo_time::operator==(), roo_time::operator>(), and roo_time::operator>=().
|
inline |
Returns uptime in milliseconds.
Definition at line 480 of file roo_time.h.
|
inline |
Returns uptime in minutes.
Definition at line 486 of file roo_time.h.
|
inline |
Returns uptime in seconds.
Definition at line 483 of file roo_time.h.
|
inlinestatic |
Returns the maximum representable uptime value.
Definition at line 453 of file roo_time.h.
References Uptime().
Returns current monotonic process uptime.
Definition at line 120 of file uptime_now.cpp.
References roo_time::last_reading, roo_time::offset, and Uptime().
Referenced by roo_time::DelayUntil().
Adds duration to this uptime.
Definition at line 496 of file roo_time.h.
References roo_time::Duration::inMicros().
Subtracts duration from this uptime.
Definition at line 502 of file roo_time.h.
References roo_time::Duration::inMicros().
Assignment operator.
Definition at line 465 of file roo_time.h.
Assignment operator for volatile sources.
Definition at line 471 of file roo_time.h.
|
inlinestatic |
Returns uptime value at process start.
Definition at line 450 of file roo_time.h.
References Uptime().
Returns uptime shifted by duration.
Definition at line 563 of file roo_time.h.
Returns uptime shifted by duration.
Definition at line 553 of file roo_time.h.
Returns uptime shifted backwards by duration.
Definition at line 558 of file roo_time.h.