#include <OnixS/CME/DropCopy/Time.h>
Static Public Member Functions | |
static TimeSpan | deserialize (const std::string &str) |
Static Public Attributes | |
static const TimeSpan | Zero |
Represents time interval. Used primarily to present time-only stamps and to measure time intervals between two timestamps.
TimeSpan | ( | ) |
Initializes zero span.
Initializes with given set of values. Input parameters are treated as quantities, but not as a time stamp. Therefore, there's no requirement to fit in a certain range like hours must fit into [0, 24) range. After initialization time span will be normalized.
Initializes with given set of values. Input parameters are treated as quantities, but not as a time stamp. Therefore, there's no requirement to fit in a certain range like hours must fit into [0, 24) range. After initialization time span will be normalized.
Initializes time interval from total number seconds and its fractional (nanosecond) part.
Int32 days | ( | ) | const |
Days component of time interval. Whole number of days in time interval.
|
static |
De-serializes time interval from its text presentation.
Int32 hours | ( | ) | const |
Hours component of time interval. Values are in range from -23 through 23.
Int32 microseconds | ( | ) | const |
Microseconds component of time interval. Values are in range from -999999 through 999999.
Int32 milliseconds | ( | ) | const |
Milliseconds component of time interval. Values are in range from -999 through 999.
Int32 minutes | ( | ) | const |
Minutes component of time interval. Values are in range from -59 through 59.
|
inline |
bool operator!= | ( | const TimeSpan & | other | ) | const |
Compares with other instance for in-equality.
bool operator< | ( | const TimeSpan & | other | ) | const |
Checks whether time interval less than other one.
bool operator== | ( | const TimeSpan & | other | ) | const |
Compares with other instance for equality.
bool operator> | ( | const TimeSpan & | other | ) | const |
Checks whether time interval greater than other one.
Int32 seconds | ( | ) | const |
Seconds component of time interval. Values are in range from -59 through 59.
void toString | ( | std::string & | str, |
TimeSpanFormat | format = TimeSpanFormats::SDHHMMSSnsec |
||
) | const |
Serializes time stamp into text presentation using specified time-span presentation format.
|
inline |
|
inline |