libfilezilla
|
The duration
class represents a time interval in milliseconds.
More...
#include <time.hpp>
Public Member Functions | |
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) |
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 |
Getters | |
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 |
Static Public Member Functions | |
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) |
Friends | |
duration | operator- (duration const &a, duration const &b) |
duration | operator+ (duration const &a, duration const &b) |
duration | operator/ (duration const &a, int64_t b) |
Related Functions | |
(Note that these are not member functions.) | |
duration | operator- (datetime const &a, datetime const &b) |
Gets the difference between two timestamps as duration. More... | |
duration | operator- (monotonic_clock const &a, monotonic_clock const &b) |
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.
Gets the difference between two timestamps as duration.
This function ignores accuracy, it treats both timestamps as if they had millisecond-accuracy.
|
related |
Gets the difference between two clocks as duration