23#include <OnixS/SURF/MarketData/Export.h>
37typedef unsigned __int64 AbsoluteHighResolutionTimeImpl;
39typedef __int64 RelativeHighResolutionTimeImpl;
41#elif defined(__linux__)
43typedef timeval AbsoluteHighResolutionTimeImpl;
47} RelativeHighResolutionTimeImpl;
51# error High resolution time services are not defined for a given platform.
141 AbsoluteHighResolutionTimeImpl asAbsolute;
142 RelativeHighResolutionTimeImpl asRelative;
148 HighResolutionTime(ValueKind kind);
153 return !(Invalid == kind_);
Miscellaneous time traits.
bool operator==(const HighResolutionTime &) const
Compares two timestamps for equality.
static HighResolutionTime parse(const std::string &time)
Returns time from its string presentation.
std::string toString() const
Returns canonical presentation of time.
void setToNow()
Updates to current time.
HighResolutionTimeSpan operator-(const HighResolutionTime &) const
Returns difference between two times in microseconds.
HighResolutionTime(long long)
Initializes from given number of milliseconds since Jan 1st, 1970, 00:00:00 GMT.
bool isValid() const
Indicates whether the instance is valid time.
HighResolutionTime & operator=(const HighResolutionTime &)
Reinitializes from the other instance.
HighResolutionTime(const HighResolutionTimeFields &)
Initializes from the given set of time attributes.
HighResolutionTime(const HighResolutionTime &)
Initializes from the other instance.
static HighResolutionTime now()
Returns current time.
void getFields(HighResolutionTimeFields *fields) const
Extracts details like year, month, seconds, etc.
bool operator!=(const HighResolutionTime &) const
Compares two timestamps for inequality.
HighResolutionTime()
Initializes as bad.
long long HighResolutionTimeSpan
std::ostream & operator<<(std::ostream &, const Decimal &)
void fromAbsolute(const AbsoluteHighResolutionTimeImpl &)
Reinterpret from absolute representation.
void fromString(const std::string &)
Parse from string.
std::string toString() const
Returns string representation.
void toAbsolute(AbsoluteHighResolutionTimeImpl *) const
Convert to absolute representation.
HighResolutionTimeFields()
Default constructor.
unsigned int microseconds