Absolute Time, a particular measured instance in time, could be thought of as a set of relative times which are all relative to a shared time (usually 0). More...
Collaboration diagram for MAKLogger::DtAbsoluteTime:Public Member Functions | |
| DtAbsoluteTime (double absTime) | |
| Initialize absolute time to double time value. | |
| void | offset (const DtRelativeTime &relTime) |
| Offset absolute time, by relative time amount. | |
| DtRelativeTime | relative (const DtAbsoluteTime &time2) const |
| calculate relative time between time2 and this time, via time2 - this | |
| DtAbsoluteTime | operator+ (const DtRelativeTime &relTime) const |
| Offset time by relative time, using + and - operators. | |
| DtAbsoluteTime | operator- (const DtRelativeTime &relTime) const |
| DtAbsoluteTime & | operator+= (const DtRelativeTime &relTime) |
| DtAbsoluteTime & | operator-= (const DtRelativeTime &relTime) |
| DtRelativeTime | operator- (const DtAbsoluteTime &absTime) const |
| bool | operator== (const DtAbsoluteTime &) const |
| Check if time are the same. | |
| bool | operator!= (const DtAbsoluteTime &) const |
| bool | operator< (const DtAbsoluteTime &) const |
| bool | operator> (const DtAbsoluteTime &) const |
| bool | operator<= (const DtAbsoluteTime &) const |
| bool | operator>= (const DtAbsoluteTime &) const |
| double | hours () const |
| Get the time in hours. | |
| double | minutes () const |
| Get the time in minutes. | |
| double | seconds () const |
| Get the time in seconds. | |
| long | hourPart () const |
| Get just the hours (0-...) | |
| long | minutePart () const |
| Get just the minutes (0-59) | |
| long | secondPart () const |
| Get just the second part (0-59) | |
| long | milisecondPart () const |
| Get just the milisecond part (0 - 999) | |
| DtString | toString (int percision=0) const |
| Creates. | |
Static Public Member Functions | |
| static double | parseString (const DtString &timeString) |
| Parses a string to a double. | |
Protected Attributes | |
| double | myTime |
Absolute Time, a particular measured instance in time, could be thought of as a set of relative times which are all relative to a shared time (usually 0).
| MAKLogger::DtAbsoluteTime::DtAbsoluteTime | ( | double | absTime | ) |
Initialize absolute time to double time value.
| DtCorruptedState | if time is negative. |
| double MAKLogger::DtAbsoluteTime::hours | ( | ) | const |
Get the time in hours.
| double MAKLogger::DtAbsoluteTime::minutes | ( | ) | const |
Get the time in minutes.
| DtAbsoluteTime MAKLogger::DtAbsoluteTime::operator+ | ( | const DtRelativeTime & | relTime | ) | const |
Offset time by relative time, using + and - operators.
| DtCorruptedState | if time is negative. |
| DtAbsoluteTime& MAKLogger::DtAbsoluteTime::operator+= | ( | const DtRelativeTime & | relTime | ) |
| DtCorruptedState | if time is negative. |
| DtAbsoluteTime MAKLogger::DtAbsoluteTime::operator- | ( | const DtRelativeTime & | relTime | ) | const |
| DtCorruptedState | if time is negative. |
| DtAbsoluteTime& MAKLogger::DtAbsoluteTime::operator-= | ( | const DtRelativeTime & | relTime | ) |
| DtCorruptedState | if time is negative. |
| static double MAKLogger::DtAbsoluteTime::parseString | ( | const DtString & | timeString | ) | [static] |
Parses a string to a double.
Value is a double rather than an absolute time since absolute time may not be negative.
| DtInvalidInput | if timeString is not formatted correctly. |
| DtCorruptedState | if time is negative. |
| double MAKLogger::DtAbsoluteTime::seconds | ( | ) | const |
Get the time in seconds.