|
B2BITS FIX Antenna HFT
1.0.17
|
Time-related functions. More...
#include <FE_SYS_Time.h>
Public Types | |
| typedef u64 | AbsoluteLocalTime |
| Absolute local time. More... | |
| typedef u64 | AbsoluteSystemTime |
| Absolute system time (UTC) in milliseconds. More... | |
| typedef u64 | AbsoluteSystemTimeUsec1970 |
| Absolute system time (UTC) in microseconds. More... | |
| typedef u64 | RelativeTime |
| Relative time. More... | |
Static Public Member Functions | |
| static AbsoluteSystemTime | afterMidnightLocalTime () |
| Returns the todays time in milliseconds (after midnight). More... | |
| static AbsoluteLocalTime | currentLocalTime () |
| Returns the current local time in milliseconds. More... | |
| static AbsoluteSystemTime | currentTime () |
| Returns the current UTC time in milliseconds. More... | |
| static System::u64 | currentTimestampNS () |
| Returns the current UTC timestamp in nanoseconds. More... | |
| static AbsoluteSystemTimeUsec1970 | currentTimeUsec1970 () |
| Returns the current UTC time in microseconds. More... | |
| static u64 | deltaUsec (RelativeTime t2, RelativeTime t1) |
| Calculates delta in microseconds between two time values. More... | |
| static AbsoluteSystemTime | fromTimespec (timespec v) |
| Converts from the struct timespec (containing the time interval since UNIX epoch like time_t) to the internal format. More... | |
| static AbsoluteSystemTime | fromTimeT (time_t v) |
| Converts from the unix timestamp to the internal format. More... | |
| static AbsoluteSystemTime | fromTimeval (timeval v) |
| Converts from the struct timeval (containing the time interval since UNIX epoch like time_t) to the internal format. More... | |
| static AbsoluteSystemTime | fromWindowsFileTime (u64 v) |
| Converts from the Windows FileTime to the internal format. More... | |
| static RelativeTime | getMonotonicTime () |
| Returns number of milliseconds steadily. More... | |
| static const std::string | getUTCTimestamp () |
| Returns the current UTC time std::string in the "YYYYMMDD-HH:MM:SS" format. More... | |
| static void | getUTCTimestamp (char *out) |
| Returns the current UTC time std::string in the "YYYYMMDD-HH:MM:SS" format. More... | |
| static const std::string | getUTCTimestampWithMicroseconds () |
| Returns the current UTC time std::string in the "YYYYMMDD-HH:MM:SS.ssssss" format. More... | |
| static const std::string | getUTCTimestampWithMs () |
| Returns the current UTC time std::string in the "YYYYMMDD-HH:MM:SS.sss" format. More... | |
| static void | getUTCTimestampWithMs (char *out) |
| Returns the current UTC time std::string in the "YYYYMMDD-HH:MM:SS.sss" format. More... | |
| static const std::string & | getUTCTimestampWithMs_TLS () |
| Returns the current UTC time in the "YYYYMMDD-HH:MM:SS.sss" format. More... | |
| static void | getUTCTimestampWithMsNoZeroTerm (char *out) |
| Returns the current UTC time std::string in the "YYYYMMDD-HH:MM:SS.sss" format. More... | |
| static AbsoluteSystemTime | pastMidnightTime () |
| Returns the past midnight time in milliseconds (UTC). More... | |
| static u64 | string2time (const std::string &str) |
| Returns the time value in milliseconds of the given std::string in the "YYYYMMDD-HH:MM:SS.sss" or "YYYYMMDD-HH:MM:SS" format. More... | |
| static u64 | time2ms (const std::string &time) |
| Converts time to millisconds. More... | |
| static const std::string | time2string (AbsoluteSystemTime timeValue, bool includeMilliseconds=true) |
| Returns the std::string representation of the given time value. More... | |
| static void | time2string (char *dest, u64 timeValue, bool includeMilliseconds=true) |
| Returns the std::string representation of the given time value. More... | |
| static const std::string | time2string1970 (AbsoluteSystemTimeUsec1970 timeValue) |
| Returns string representation of the given time value. More... | |
| static void | time2string1970 (char *dest, AbsoluteSystemTimeUsec1970 timeValue, bool includeMilliseconds=true, bool includeMicroseconds=true) |
| Returns string representation of the given time value. More... | |
| static u64 | timeToDecimal (AbsoluteSystemTime timeValue, bool withMs=true) throw () |
| Converts UTC time to decimal format YYYYMMDDHHmmsszzz. More... | |
| static timespec * | toTimespec (timespec *dest, AbsoluteSystemTime src) |
| Converts the internal time value as the time interval since UNIX epoch to the struct timespec format. More... | |
| static time_t | toTimeT (AbsoluteSystemTime v) |
| Converts the internal time value to the unix timestamp format. More... | |
| static timeval * | toTimeval (timeval *dest, AbsoluteSystemTime src) |
| Converts the internal time value as the time interval since UNIX epoch to the struct timeval format. More... | |
| static u64 | toWindowsFileTime (AbsoluteSystemTime v) |
| Converts internal time value to the Windows FileTime format. More... | |
Time-related functions.
| typedef u64 System::Time::AbsoluteLocalTime |
Absolute local time.
| typedef u64 System::Time::AbsoluteSystemTime |
Absolute system time (UTC) in milliseconds.
Absolute system time (UTC) in microseconds.
| typedef u64 System::Time::RelativeTime |
Relative time.
|
static |
Returns the todays time in milliseconds (after midnight).
| SystemException. |
|
static |
Returns the current local time in milliseconds.
| SystemException. |
Referenced by now_file().
|
static |
Returns the current UTC time in milliseconds.
| SystemException. |
|
static |
Returns the current UTC timestamp in nanoseconds.
| SystemException. |
|
static |
Returns the current UTC time in microseconds.
| SystemException. |
Referenced by NanosTimeConvertRecalib::calcDiff1(), get_currentTimeUsec1970(), and Engine::GlobalMsgIdGen::GlobalMsgIdGen().
|
static |
Calculates delta in microseconds between two time values.
|
inlinestatic |
Converts from the struct timespec (containing the time interval since UNIX epoch like time_t) to the internal format.
|
inlinestatic |
Converts from the unix timestamp to the internal format.
|
inlinestatic |
Converts from the struct timeval (containing the time interval since UNIX epoch like time_t) to the internal format.
|
inlinestatic |
Converts from the Windows FileTime to the internal format.
Converts from Windows FileTime to interbal format.
References System::WIN_TIME_CORRECTOR.
|
static |
Returns number of milliseconds steadily.
|
inlinestatic |
Returns the current UTC time std::string in the "YYYYMMDD-HH:MM:SS" format.
| SystemException. |
References System::Time_UTCTimestampSize.
|
static |
Returns the current UTC time std::string in the "YYYYMMDD-HH:MM:SS" format.
| out | Is memory buffer of UTCTimestampSize bytes |
| SystemException. |
|
static |
Returns the current UTC time std::string in the "YYYYMMDD-HH:MM:SS.ssssss" format.
| SystemException |
|
inlinestatic |
Returns the current UTC time std::string in the "YYYYMMDD-HH:MM:SS.sss" format.
| SystemException |
References getUTCTimestampWithMsNoZeroTerm(), and System::Time_UTCTimestampMsNoZeroTermSize.
Referenced by Engine::LogFileT< FileT >::log().
|
inlinestatic |
Returns the current UTC time std::string in the "YYYYMMDD-HH:MM:SS.sss" format.
| out | Is memory buffer of UTCTimestampMsSize bytes |
References getUTCTimestampWithMsNoZeroTerm(), and System::Time_UTCTimestampMsSize.
|
static |
Returns the current UTC time in the "YYYYMMDD-HH:MM:SS.sss" format.
| SystemException |
|
static |
Returns the current UTC time std::string in the "YYYYMMDD-HH:MM:SS.sss" format.
| out | Is memory buffer of UTCTimestampMsSizeNoZeroTerm bytes |
Referenced by getUTCTimestampWithMs().
|
static |
Returns the past midnight time in milliseconds (UTC).
| SystemException. |
|
static |
Returns the time value in milliseconds of the given std::string in the "YYYYMMDD-HH:MM:SS.sss" or "YYYYMMDD-HH:MM:SS" format.
| SystemException |
|
static |
Converts time to millisconds.
| time | std::string representation of time (hh:mm or hh:mm:ss) |
| Utils::Exception | when property cannot be extracted. |
|
inlinestatic |
Returns the std::string representation of the given time value.
| includeMilliseconds | If true that the output format is "YYYYMMDD-HH:MM:SS.sss" format, otherwise - "YYYYMMDD-HH:MM:SS". |
| SystemException |
References System::Time_UTCTimestampMsSize, and System::Time_UTCTimestampSize.
Referenced by now_file().
|
static |
Returns the std::string representation of the given time value.
| timeValue | is either AbsoluteSystemTime or AbsoluteLocalTime |
| includeMilliseconds | If true that the output format is "YYYYMMDD-HH:MM:SS.sss" format, otherwise - "YYYYMMDD-HH:MM:SS". |
| SystemException |
|
inlinestatic |
Returns string representation of the given time value.
| timeValue | is microseconds since January 1, 1970 UTC |
| SystemException |
References System::Time_UTCTimestampUsNoZeroTermSize.
Referenced by fix_algo::reorderSMHForMiax().
|
static |
Returns string representation of the given time value.
| timeValue | is microseconds since January 1, 1970 UTC |
| SystemException |
|
static | ||||||||||||||||||||
Converts UTC time to decimal format YYYYMMDDHHmmsszzz.
|
inlinestatic |
Converts the internal time value as the time interval since UNIX epoch to the struct timespec format.
|
inlinestatic |
Converts the internal time value to the unix timestamp format.
|
static |
Converts the internal time value as the time interval since UNIX epoch to the struct timeval format.
|
inlinestatic |
Converts internal time value to the Windows FileTime format.
References System::WIN_TIME_CORRECTOR.
1.8.5