OnixS CBOE CMi2 Trading Handler for C++  1.1.3.0
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
HighResolutionTime Class Reference

Miscellaneous time traits. More...

Public Member Functions

 HighResolutionTime ()
 Initializes as not valid. More...
 
 HighResolutionTime (UInt64)
 Initializes from given number of milliseconds since Jan 1st, 1970, 00:00:00 GMT. More...
 
 HighResolutionTime (const HighResolutionTimeFields &)
 Initializes from the given set of time attributes. More...
 
 HighResolutionTime (const HighResolutionTime &)
 Initializes from the other instance. More...
 
bool isValid () const
 Indicates whether the instance is valid time. More...
 
void getFields (HighResolutionTimeFields *fields) const
 Extracts details like year, month, seconds, etc. More...
 
std::string toString () const
 Returns canonical presentation of time. More...
 
void setToNow ()
 Updates to current time. More...
 
bool operator== (const HighResolutionTime &) const
 Compares two timestamps for equality. More...
 
bool operator!= (const HighResolutionTime &) const
 Compares two timestamps for inequality. More...
 
HighResolutionTimeSpan operator- (const HighResolutionTime &) const
 Returns difference between two times in microseconds. More...
 
HighResolutionTimeoperator= (const HighResolutionTime &)
 Reinitializes from the other instance. More...
 

Static Public Member Functions

static HighResolutionTime now ()
 Returns current time. More...
 
static HighResolutionTime parse (const std::string &time)
 Returns time from its string presentation. More...
 

Friends

struct TimestampHelpers
 

Detailed Description

Miscellaneous time traits.

Constructor & Destructor Documentation

Initializes as not valid.

HighResolutionTime ( UInt64  )

Initializes from given number of milliseconds since Jan 1st, 1970, 00:00:00 GMT.

Initializes from the given set of time attributes.

Initializes from the other instance.

Member Function Documentation

void getFields ( HighResolutionTimeFields fields) const

Extracts details like year, month, seconds, etc.

bool isValid ( ) const
inline

Indicates whether the instance is valid time.

static HighResolutionTime now ( )
static

Returns current time.

bool operator!= ( const HighResolutionTime ) const

Compares two timestamps for inequality.

HighResolutionTimeSpan operator- ( const HighResolutionTime ) const

Returns difference between two times in microseconds.

HighResolutionTime& operator= ( const HighResolutionTime )

Reinitializes from the other instance.

bool operator== ( const HighResolutionTime ) const

Compares two timestamps for equality.

static HighResolutionTime parse ( const std::string &  time)
static

Returns time from its string presentation.

void setToNow ( )

Updates to current time.

std::string toString ( ) const

Returns canonical presentation of time.