![]() |
Murl Engine API
Version 2018.3
|
The time class provides high resolution time data. More...
#include <murl_system_time.h>
The time class provides high resolution time data.
Public Member Functions | |
Time () | |
The default constructor. More... | |
Time (Double seconds) | |
Constructor taking floating point seconds. More... | |
Time (UInt64 seconds) | |
Constructor taking integer seconds. More... | |
Time (UInt64 seconds, UInt64 nanoSeconds) | |
Constructor taking seconds and nanoseconds. More... | |
void | SetNow () |
Set to the current time-of-day. More... | |
void | SetTickCount () |
Set to the current tick count. More... | |
void | SetZero () |
Set to the zero time. | |
void | SetInfinite () |
Set to the infinite time. | |
Double | GetDouble () const |
Get the time in floating point seconds. More... | |
void | SetDouble (Double seconds) |
Set the time from floating point seconds. More... | |
UInt64 | GetSeconds () const |
Get the time in integer seconds. More... | |
void | SetSeconds (UInt64 seconds) |
Set the time in integer seconds. More... | |
UInt64 | GetMilliSeconds () const |
Get the time in milliseconds. More... | |
void | SetMilliSeconds (UInt64 milliSeconds) |
Set the time in milliseconds. More... | |
UInt64 | GetMicroSeconds () const |
Get the time in microseconds. More... | |
void | SetMicroSeconds (UInt64 microSeconds) |
Set the time in microseconds. More... | |
UInt64 | GetNanoSeconds () const |
Get the time in nanoseconds. More... | |
void | SetNanoSeconds (UInt64 nanoSeconds) |
Set the time in nanoseconds. More... | |
UInt64 | GetMilliSecondsFraction () const |
Get the seconds fractional part in milliseconds. More... | |
UInt64 | GetMicroSecondsFraction () const |
Get the seconds fractional part in microseconds. More... | |
UInt64 | GetNanoSecondsFraction () const |
Get the seconds fractional part in nanoseconds. More... | |
Bool | IsZero () const |
Check if the time is zero. More... | |
Bool | IsInfinite () const |
Check if the time is infinite. More... | |
Time & | operator+= (const Time &rhs) |
In-place addition operator. More... | |
Time & | operator-= (const Time &rhs) |
In-place subtraction operator. More... | |
Time | operator+ (const Time &rhs) const |
Addition operator. More... | |
Time | operator- (const Time &rhs) const |
Subtraction operator. More... | |
bool | operator== (const Time &rhs) const |
Equal to comparison operator. More... | |
bool | operator!= (const Time &rhs) const |
Not equal to comparison operator. More... | |
bool | operator< (const Time &rhs) const |
Less than operator. More... | |
bool | operator<= (const Time &rhs) const |
Less than or equal to operator. More... | |
bool | operator> (const Time &rhs) const |
Greater than operator. More... | |
bool | operator>= (const Time &rhs) const |
Greater than or equal to operator. More... | |
String | ToString () const |
Get the string representation of the object. More... | |
Static Public Member Functions | |
static Time | GetNow () |
Get the current time-of-day. More... | |
static Time | GetTickCount () |
Get the current tick count. More... | |
static Time | FromSeconds (UInt64 seconds) |
Get the time from specified seconds. More... | |
static Time | FromMilliSeconds (UInt64 milliSeconds) |
Get the time from specified milliseconds. More... | |
static Time | FromMicroSeconds (UInt64 microSeconds) |
Get the time from specified microseconds. More... | |
static Time | FromNanoSeconds (UInt64 nanoSeconds) |
Get the time from specified nanoseconds. More... | |
static Time | Zero () |
Get zero time. More... | |
static Time | Infinite () |
Get infinite time. More... | |
static Time | Min () |
Get minimum time. More... | |
static Time | Max () |
Get maximum time. More... | |
Protected Attributes | |
UInt64 | mSeconds |
The seconds. More... | |
UInt64 | mNanoSeconds |
The nanoseconds fraction. More... | |
Murl::System::Time::Time | ( | ) |
The default constructor.
The time is set to zero.
Murl::System::Time::Time | ( | Double | seconds | ) |
Constructor taking floating point seconds.
seconds | The number of seconds. |
Murl::System::Time::Time | ( | UInt64 | seconds | ) |
Constructor taking integer seconds.
seconds | The number of seconds. |
Constructor taking seconds and nanoseconds.
seconds | The number of seconds. |
nanoSeconds | The number of nanoseconds. |
|
static |
Get the current time-of-day.
The time is the number of seconds since 00:00 hours, Jan 1, 1970 UTC.
|
static |
Get the current tick count.
The tick count is the absolute elapsed time since some arbitrary, fixed point in the past.
It is not affected by changes in the system time-of-day clock.
Get the time from specified seconds.
seconds | The number of seconds. |
Get the time from specified milliseconds.
milliSeconds | The number of milliseconds. |
Get the time from specified microseconds.
microSeconds | The number of microseconds. |
Get the time from specified nanoseconds.
nanoSeconds | The number of nanoseconds. |
|
static |
Get zero time.
|
static |
Get infinite time.
|
static |
Get minimum time.
|
static |
Get maximum time.
void Murl::System::Time::SetNow | ( | ) |
Set to the current time-of-day.
The time is the number of seconds since 00:00 hours, Jan 1, 1970 UTC.
void Murl::System::Time::SetTickCount | ( | ) |
Set to the current tick count.
The tick count is the absolute elapsed time since some arbitrary, fixed point in the past.
It is not affected by changes in the system time-of-day clock.
Double Murl::System::Time::GetDouble | ( | ) | const |
Get the time in floating point seconds.
void Murl::System::Time::SetDouble | ( | Double | seconds | ) |
Set the time from floating point seconds.
seconds | The time in number of seconds. |
UInt64 Murl::System::Time::GetSeconds | ( | ) | const |
Get the time in integer seconds.
void Murl::System::Time::SetSeconds | ( | UInt64 | seconds | ) |
Set the time in integer seconds.
seconds | The time in seconds. |
UInt64 Murl::System::Time::GetMilliSeconds | ( | ) | const |
Get the time in milliseconds.
void Murl::System::Time::SetMilliSeconds | ( | UInt64 | milliSeconds | ) |
Set the time in milliseconds.
milliSeconds | The time in milliseconds. |
UInt64 Murl::System::Time::GetMicroSeconds | ( | ) | const |
Get the time in microseconds.
void Murl::System::Time::SetMicroSeconds | ( | UInt64 | microSeconds | ) |
Set the time in microseconds.
microSeconds | The time in microseconds. |
UInt64 Murl::System::Time::GetNanoSeconds | ( | ) | const |
Get the time in nanoseconds.
void Murl::System::Time::SetNanoSeconds | ( | UInt64 | nanoSeconds | ) |
Set the time in nanoseconds.
nanoSeconds | The time in nanoseconds. |
UInt64 Murl::System::Time::GetMilliSecondsFraction | ( | ) | const |
Get the seconds fractional part in milliseconds.
UInt64 Murl::System::Time::GetMicroSecondsFraction | ( | ) | const |
Get the seconds fractional part in microseconds.
UInt64 Murl::System::Time::GetNanoSecondsFraction | ( | ) | const |
Get the seconds fractional part in nanoseconds.
Bool Murl::System::Time::IsZero | ( | ) | const |
Check if the time is zero.
Bool Murl::System::Time::IsInfinite | ( | ) | const |
Check if the time is infinite.
In-place addition operator.
rhs | The time to add. |
In-place subtraction operator.
rhs | The time to subtract. |
Addition operator.
rhs | The right hand side time. |
Subtraction operator.
rhs | The right hand side time. |
bool Murl::System::Time::operator== | ( | const Time & | rhs | ) | const |
Equal to comparison operator.
rhs | The right hand side time to compare. |
bool Murl::System::Time::operator!= | ( | const Time & | rhs | ) | const |
Not equal to comparison operator.
rhs | The right hand side time to compare. |
bool Murl::System::Time::operator< | ( | const Time & | rhs | ) | const |
Less than operator.
rhs | The right hand side time to compare. |
bool Murl::System::Time::operator<= | ( | const Time & | rhs | ) | const |
Less than or equal to operator.
rhs | The right hand side time to compare. |
bool Murl::System::Time::operator> | ( | const Time & | rhs | ) | const |
Greater than operator.
rhs | The right hand side time to compare. |
bool Murl::System::Time::operator>= | ( | const Time & | rhs | ) | const |
Greater than or equal to operator.
rhs | The right hand side time to compare. |
String Murl::System::Time::ToString | ( | ) | const |
Get the string representation of the object.
|
protected |
The seconds.
|
protected |
The nanoseconds fraction.