This class provides time operations.
Definition at line 282 of file chrono.h.
OSB_LIB::Time::Time | ( | int | sec = 0 |
) | [inline, explicit] |
OSB_LIB::Time::Time | ( | int | hour, | |
int | min, | |||
int | sec | |||
) |
Constructor with hour, minutes and seconds.
OsbException | if a component other than the biggest one is negative. |
OSB_LIB::Time::Time | ( | const std::string & | src | ) | [explicit] |
Construct from string, format '[-]hh:mm:ss'.
OsbException | if src contains invalid characters. | |
OsbException | if a component other than the biggest one is negative. |
Time& OSB_LIB::Time::addHours | ( | int | ) |
Add n hours.
Time& OSB_LIB::Time::addMinutes | ( | int | ) |
Add n minutes.
void OSB_LIB::Time::getHms | ( | int & | hour, | |
int & | min, | |||
int & | sec | |||
) | const [inline] |
void OSB_LIB::Time::hms2t | ( | int | hour, | |
int | min, | |||
int | sec | |||
) | [private] |
Convert hour,min,sec to t.
int OSB_LIB::Time::hour | ( | ) | const |
Returns hour.
int OSB_LIB::Time::minute | ( | ) | const |
Returns min.
static Time OSB_LIB::Time::now | ( | ) | [static] |
Get current system time.
long OSB_LIB::Time::numSeconds | ( | ) | const [inline] |
bool OSB_LIB::Time::operator!= | ( | const Time & | ) | const |
Operator!=.
bool OSB_LIB::Time::operator< | ( | const Time & | ) | const |
Operator<.
bool OSB_LIB::Time::operator<= | ( | const Time & | ) | const |
Operator<=.
bool OSB_LIB::Time::operator== | ( | const Time & | ) | const |
Operator==.
bool OSB_LIB::Time::operator> | ( | const Time & | ) | const |
Operator>.
bool OSB_LIB::Time::operator>= | ( | const Time & | ) | const |
Operator>=.
int OSB_LIB::Time::second | ( | ) | const |
Returns seconds.
std::string OSB_LIB::Time::str | ( | ) | const |
Return Time as a string.
void OSB_LIB::Time::t2hms | ( | int & | hour, | |
int & | min, | |||
int & | sec | |||
) | const [private] |
long OSB_LIB::Time::t_ [private] |