#include <OnixS/FIXEngine/FIX/Timestamp.h>
Static Public Member Functions | |
static Timestamp | utc () |
static Timestamp | local () |
static Timestamp | parse (const std::string &, TimestampFormat::Enum=TimestampFormat::YYYYMMDDHHMMSSNsec) |
Friends | |
class | TimeManager |
Definition at line 91 of file Timestamp.h.
Timestamp | ( | ) |
Constructs an uninitialized instance.
|
inline |
Initializes from seconds and nanoseconds since Jan 1, 0001, 00:00:00.
Definition at line 228 of file Timestamp.h.
|
inline |
Initializes from seconds and picoseconds since Jan 1, 0001, 00:00:00.
Definition at line 236 of file Timestamp.h.
Timestamp | ( | Year | year, |
Month::Enum | month, | ||
Day | day, | ||
Hour | hour = 0 , |
||
Minute | minute = 0 , |
||
Second | second = 0 , |
||
Nanosecond | nanosecond = 0 |
||
) |
Initializes date-time from all details.
Timestamp | ( | Year | year, |
Month::Enum | month, | ||
Day | day, | ||
Hour | hour, | ||
Minute | minute, | ||
Second | second, | ||
Picosecond | picosecond | ||
) |
Initializes date-time from all details.
|
explicit |
Initializes from nanoseconds since Jan 1, 1970, 00:00:00 (Unix epoch).
void date | ( | YearMonthDay & | ) | const |
Returns the date part of the timestamp.
Day day | ( | ) | const |
The current day of month.
Valid values are 1 through 31.
Hour hour | ( | ) | const |
The current hour.
Valid values are 0 through 23.
|
static |
Returns the current local time.
|
inline |
The current microsecond.
Valid values are 0 through 999999.
Definition at line 259 of file Timestamp.h.
|
inline |
The current millisecond.
Valid values are 0 through 999.
Definition at line 252 of file Timestamp.h.
Minute minute | ( | ) | const |
The current minute.
Valid values are 0 through 59.
Month::Enum month | ( | ) | const |
The current month.
|
inline |
The current nanosecond.
Valid values are 0 through 999999999.
Definition at line 266 of file Timestamp.h.
bool operator!= | ( | const Timestamp & | ) | const |
Compares the instance with another one.
bool operator< | ( | const Timestamp & | ) | const |
Tests whether the instance is less than another one.
bool operator== | ( | const Timestamp & | ) | const |
Compares the instance with another one.
|
static |
Parses the timestamp from its text presentation assuming it's in the specified format ("YYYYMMDD-HH:MM:SS.sssssssss" by default).
|
inline |
The current picosecond.
Valid values are 0 through 999999999999.
Definition at line 273 of file Timestamp.h.
Second second | ( | ) | const |
The current second.
Valid values are 0 through 59.
|
inline |
Returns the timestamp text presentation in the requested format ("YYYYMMDD-HH:MM:SS.sssssssss" by default).
Definition at line 280 of file Timestamp.h.
void toString | ( | std::string & | str, |
TimestampFormat::Enum | = TimestampFormat::YYYYMMDDHHMMSSNsec |
||
) | const |
Appends the timestamp text presentation in the requested format ("YYYYMMDD-HH:MM:SS.sssssssss" by default).
|
inline |
The total number of seconds since Jan 1, 0001, 00:00:00.
Definition at line 245 of file Timestamp.h.
TotalNanoseconds toUnixNanosecondTimestamp | ( | ) | const |
Returns the nanosecond timestamp since the Unix epoch.
|
static |
Returns the current UTC time.
Year year | ( | ) | const |
The current year.
|
friend |
Definition at line 221 of file Timestamp.h.