The duration class represents a time interval in milliseconds.
More...
#include <time.hpp>
|
|
duration | absolute () const |
|
bool | operator< (duration const &op) const |
|
bool | operator<= (duration const &op) const |
|
bool | operator> (duration const &op) const |
|
bool | operator>= (duration const &op) const |
All getters return the total time of the duration, rounded down to the requested granularity.
|
|
int64_t | get_days () const |
|
int64_t | get_hours () const |
|
int64_t | get_minutes () const |
|
int64_t | get_seconds () const |
|
int64_t | get_milliseconds () const |
|
|
duration | operator- (duration const &a, duration const &b) |
|
duration | operator+ (duration const &a, duration const &b) |
|
duration | operator/ (duration const &a, int64_t b) |
|
|
duration & | operator+= (duration const &op) |
|
duration & | operator-= (duration const &op) |
|
duration & | operator/= (int64_t op) |
|
duration | operator- () const |
|
| operator bool () const |
|
duration & | operator*= (int64_t op) |
|
static duration | from_days (int64_t m) |
|
static duration | from_hours (int64_t m) |
|
static duration | from_minutes (int64_t m) |
|
static duration | from_seconds (int64_t m) |
|
static duration | from_milliseconds (int64_t m) |
The duration class represents a time interval in milliseconds.
Constructing a non-empty duration is only possible using the static setters which have the time unit as part of the function name.
In contract to datetime, duration does not track accuracy.
- Note
- Arithmetic operations on duration do not check for integer over/underflow
The documentation for this class was generated from the following file: