|
roo_time
API Documentation for roo_time
|
#include <inttypes.h>Go to the source code of this file.
Data Structures | |
| class | roo_time::Duration |
| Represents an amount of time (e.g. 5s, 10min). More... | |
| struct | roo_time::Duration::Components |
| Calendar-like decomposition of a duration value. More... | |
| class | roo_time::Uptime |
| Represents an instant relative to process/boot start time. More... | |
| class | roo_time::WallTime |
| Represents absolute wall time since Unix epoch. More... | |
| class | roo_time::WallTimeClock |
| Abstract interface for obtaining current wall time. More... | |
| class | roo_time::TimeZone |
| class | roo_time::DateTime |
| Represents wall time decomposed into date/time in a specific time zone. More... | |
Namespaces | |
| namespace | roo_time |
| Umbrella header for the roo_time module. | |
| namespace | roo_time::timezone |
Typedefs | |
| using | roo_time::Interval = Duration |
Backwards compatibility alias. Prefer Duration in new code. | |
Enumerations | |
| enum | roo_time::DayOfWeek { roo_time::kSunday = 0 , roo_time::kMonday = 1 , roo_time::kTuesday = 2 , roo_time::kWednesday = 3 , roo_time::kThursday = 4 , roo_time::kFriday = 5 , roo_time::kSaturday = 6 } |
| enum | roo_time::Month { roo_time::kJanuary = 1 , roo_time::kFebruary = 2 , roo_time::kMarch = 3 , roo_time::kApril = 4 , roo_time::kMay = 5 , roo_time::kJune = 6 , roo_time::kJuly = 7 , roo_time::kAugust = 8 , roo_time::kSeptember = 9 , roo_time::kOctober = 10 , roo_time::kNovember = 11 , roo_time::kDecember = 12 } |
Functions | |
| constexpr Duration | roo_time::Micros (long long micros) |
| Constructs a duration from microseconds. | |
| constexpr Duration | roo_time::Millis (long long millis) |
| Constructs a duration from milliseconds. | |
| constexpr Duration | roo_time::Millis (unsigned long long millis) |
| constexpr Duration | roo_time::Millis (long millis) |
| constexpr Duration | roo_time::Millis (unsigned long millis) |
| constexpr Duration | roo_time::Millis (int millis) |
| constexpr Duration | roo_time::Millis (unsigned int millis) |
| constexpr Duration | roo_time::Millis (short millis) |
| constexpr Duration | roo_time::Millis (unsigned short millis) |
| constexpr Duration | roo_time::Millis (float millis) |
| constexpr Duration | roo_time::Millis (double millis) |
| constexpr Duration | roo_time::Seconds (long long seconds) |
| Constructs a duration from seconds. | |
| constexpr Duration | roo_time::Seconds (unsigned long long seconds) |
| constexpr Duration | roo_time::Seconds (long seconds) |
| constexpr Duration | roo_time::Seconds (unsigned long seconds) |
| constexpr Duration | roo_time::Seconds (int seconds) |
| constexpr Duration | roo_time::Seconds (unsigned int seconds) |
| constexpr Duration | roo_time::Seconds (short seconds) |
| constexpr Duration | roo_time::Seconds (unsigned short seconds) |
| constexpr Duration | roo_time::Seconds (float seconds) |
| constexpr Duration | roo_time::Seconds (double seconds) |
| constexpr Duration | roo_time::Minutes (long long minutes) |
| Constructs a duration from minutes. | |
| constexpr Duration | roo_time::Minutes (unsigned long long minutes) |
| constexpr Duration | roo_time::Minutes (long minutes) |
| constexpr Duration | roo_time::Minutes (unsigned long minutes) |
| constexpr Duration | roo_time::Minutes (int minutes) |
| constexpr Duration | roo_time::Minutes (unsigned int minutes) |
| constexpr Duration | roo_time::Minutes (short minutes) |
| constexpr Duration | roo_time::Minutes (unsigned short minutes) |
| constexpr Duration | roo_time::Minutes (float minutes) |
| constexpr Duration | roo_time::Minutes (double minutes) |
| constexpr Duration | roo_time::Hours (long long hours) |
| Constructs a duration from hours. | |
| constexpr Duration | roo_time::Hours (unsigned long long minutes) |
| constexpr Duration | roo_time::Hours (long minutes) |
| constexpr Duration | roo_time::Hours (unsigned long minutes) |
| constexpr Duration | roo_time::Hours (int minutes) |
| constexpr Duration | roo_time::Hours (unsigned int minutes) |
| constexpr Duration | roo_time::Hours (short minutes) |
| constexpr Duration | roo_time::Hours (unsigned short minutes) |
| constexpr Duration | roo_time::Hours (float hours) |
| constexpr Duration | roo_time::Hours (double hours) |
| bool | roo_time::operator== (const Duration &a, const Duration &b) |
| Returns true if both durations are equal. | |
| bool | roo_time::operator!= (const Duration &a, const Duration &b) |
| Returns true if durations differ. | |
| bool | roo_time::operator< (const Duration &a, const Duration &b) |
Returns true if a is shorter than b. | |
| bool | roo_time::operator> (const Duration &a, const Duration &b) |
Returns true if a is longer than b. | |
| bool | roo_time::operator<= (const Duration &a, const Duration &b) |
Returns true if a is not longer than b. | |
| bool | roo_time::operator>= (const Duration &a, const Duration &b) |
Returns true if a is not shorter than b. | |
| Duration | roo_time::operator+ (const Duration &a, const Duration &b) |
| Returns the sum of two durations. | |
| Duration | roo_time::operator- (const Duration &a, const Duration &b) |
| Returns the difference between two durations. | |
| Duration | roo_time::operator* (const Duration &a, int b) |
| Multiplies duration by an integer factor. | |
| Duration | roo_time::operator* (int a, const Duration &b) |
| Multiplies duration by an integer factor. | |
| bool | roo_time::operator== (const Uptime &a, const Uptime &b) |
| Returns true if uptimes are equal. | |
| bool | roo_time::operator!= (const Uptime &a, const Uptime &b) |
| Returns true if uptimes differ. | |
| bool | roo_time::operator< (const Uptime &a, const Uptime &b) |
Returns true if a is earlier than b. | |
| bool | roo_time::operator> (const Uptime &a, const Uptime &b) |
Returns true if a is later than b. | |
| bool | roo_time::operator<= (const Uptime &a, const Uptime &b) |
Returns true if a is not later than b. | |
| bool | roo_time::operator>= (const Uptime &a, const Uptime &b) |
Returns true if a is not earlier than b. | |
| Duration | roo_time::operator- (const Uptime &a, const Uptime &b) |
| Returns elapsed duration between two uptime instants. | |
| Uptime | roo_time::operator+ (const Uptime &u, const Duration &i) |
| Returns uptime shifted by duration. | |
| Uptime | roo_time::operator- (const Uptime &u, const Duration &i) |
| Returns uptime shifted backwards by duration. | |
| Uptime | roo_time::operator+ (const Duration &i, const Uptime &u) |
| Returns uptime shifted by duration. | |
| void | roo_time::Delay (Duration duration) |
Delays execution for duration. | |
| void | roo_time::DelayUntil (Uptime deadline) |
Delays execution until deadline. | |
| bool | roo_time::operator== (const WallTime &a, const WallTime &b) |
| Returns true if both wall times are equal. | |
| bool | roo_time::operator!= (const WallTime &a, const WallTime &b) |
| Returns true if wall times differ. | |
| bool | roo_time::operator< (const WallTime &a, const WallTime &b) |
Returns true if a is earlier than b. | |
| bool | roo_time::operator> (const WallTime &a, const WallTime &b) |
Returns true if a is later than b. | |
| bool | roo_time::operator<= (const WallTime &a, const WallTime &b) |
Returns true if a is not later than b. | |
| bool | roo_time::operator>= (const WallTime &a, const WallTime &b) |
Returns true if a is not earlier than b. | |
| Duration | roo_time::operator- (const WallTime &a, const WallTime &b) |
| Returns elapsed duration between two wall times. | |
| WallTime | roo_time::operator+ (const WallTime &t, const Duration &i) |
| Returns wall time shifted by duration. | |
| WallTime | roo_time::operator- (const WallTime &t, const Duration &i) |
| Returns wall time shifted backwards by duration. | |
| WallTime | roo_time::operator+ (const Duration &i, const WallTime &t) |
| Returns wall time shifted by duration. | |
| bool | roo_time::operator== (const DateTime &a, const DateTime &b) |
| Returns true if both date-times represent the same instant and offset. | |
| bool | roo_time::operator!= (const DateTime &a, const DateTime &b) |
| Returns true if date-times differ in instant or time-zone offset. | |