Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/util/Time.h>
Public Member Functions | |
Time () | |
Time (int t) | |
Time (t::int64 t) | |
Time (t::uint64 t) | |
Time (const Time &t) | |
t::int64 | time () const |
t::int64 | micros () const |
t::int64 | millis () const |
t::int64 | seconds () const |
t::int64 | mins () const |
t::int64 | hours () const |
t::int64 | days () const |
t::int64 | years () const |
Time | operator+ (const Time &t) const |
Time | operator- (const Time &t) const |
Time | operator* (int n) const |
Time | operator/ (const Time &t) const |
bool | operator== (const Time &t) const |
bool | operator!= (const Time &t) const |
bool | operator< (const Time &t) const |
bool | operator<= (const Time &t) const |
bool | operator> (const Time &t) const |
bool | operator>= (const Time &t) const |
Static Public Attributes | |
const static t::int64 | ONE_MS = 1000 |
const static t::int64 | ONE_S = ONE_MS * 1000 |
const static t::int64 | ONE_M = ONE_S * 60 |
const static t::int64 | ONE_H = ONE_M * 60 |
const static t::int64 | ONE_D = ONE_H * 24 |
const static t::int64 | ONE_Y = ONE_D * 365 |
Represents a time, a duration, a delay, etc. This class supports also negative time for time subtraction.
This class comes with usual comparison and computation operators. In addition, it provides several function to access the time with different units: microsecond, milliseconds, seconds, etc.
|
inline |
Initialize a time to 0.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the time raw value, currently in milliseconds.
Referenced by elm::operator<<().
|
inline |
Referenced by Time::days(), and elm::operator<<().
Referenced by Time::hours(), and elm::operator<<().
Referenced by Time::mins(), and elm::operator<<().
|
static |
Referenced by Time::millis(), and elm::operator<<().
Referenced by elm::operator<<(), and Time::seconds().
Referenced by elm::operator<<(), and Time::years().