Represents a time value. More...
#include <Time.h>
Public Member Functions | |
Time () | |
Default constructor. More... | |
Int64 | asNanoseconds () const |
Get the time value in nanoseconds. More... | |
Int64 | asMicroseconds () const |
Get the time value in microseconds. More... | |
Int32 | asMilliseconds () const |
Get the time value in milliseconds. More... | |
float | asSeconds () const |
Get the time value in seconds. More... | |
Int64 | asMinutes () const |
Get the time value in minutes. More... | |
Int64 | asHours () const |
Get the time value in hours. More... | |
Static Public Attributes | |
static const Time | Zero |
Predefined "zero" time value. More... | |
Friends | |
IME_API Time | nanoseconds (Int64) |
IME_API Time | microseconds (Int64) |
IME_API Time | milliseconds (Int32) |
IME_API Time | seconds (float) |
IME_API Time | minutes (Int64) |
IME_API Time | hours (Int64) |
Related Functions | |
(Note that these are not member functions.) | |
IME_API Time | nanoseconds (Int64 nanoseconds) |
Construct a time value from a number of nanoseconds. More... | |
IME_API Time | microseconds (Int64 microseconds) |
Construct a time value from a number of microseconds. More... | |
IME_API Time | milliseconds (Int32 milliseconds) |
Construct a time value from a number of milliseconds. More... | |
IME_API Time | seconds (float seconds) |
Construct a time value from a number of seconds. More... | |
IME_API Time | minutes (Int64 minutes) |
Construct a time value from a number of minutes. More... | |
IME_API Time | hours (Int64 hours) |
Construct a time value from a number of hours. More... | |
IME_API bool | operator== (Time left, Time right) |
Overload of == operator to compare two time values. More... | |
IME_API bool | operator!= (Time left, Time right) |
Overload of != operator to compare two time values. More... | |
IME_API bool | operator< (Time left, Time right) |
Overload of < operator to compare two time values. More... | |
IME_API bool | operator> (Time left, Time right) |
Overload of > operator to compare two time values. More... | |
IME_API bool | operator<= (Time left, Time right) |
Overload of <= operator to compare two time values. More... | |
IME_API bool | operator>= (Time left, Time right) |
Overload of >= operator to compare two time values. More... | |
IME_API Time | operator- (Time right) |
Overload of unary - operator to negate a time value. More... | |
IME_API Time | operator+ (Time left, Time right) |
Overload of binary + operator to add two time values. More... | |
IME_API Time & | operator+= (Time &left, Time right) |
Overload of binary += operator to add/assign two time values. More... | |
IME_API Time | operator- (Time left, Time right) |
Overload of binary - operator to subtract two time values. More... | |
IME_API Time & | operator-= (Time &left, Time right) |
Overload of binary -= operator to subtract/assign two time values. More... | |
IME_API Time | operator* (Time left, float right) |
Overload of binary * operator to scale a time value. More... | |
IME_API Time | operator* (Time left, Int64 right) |
Overload of binary * operator to scale a time value. More... | |
IME_API Time | operator* (float left, Time right) |
Overload of binary * operator to scale a time value. More... | |
IME_API Time | operator* (Int64 left, Time right) |
Overload of binary * operator to scale a time value. More... | |
IME_API Time & | operator*= (Time &left, float right) |
Overload of binary *= operator to scale/assign a time value. More... | |
IME_API Time & | operator*= (Time &left, Int64 right) |
Overload of binary *= operator to scale/assign a time value. More... | |
IME_API Time | operator/ (Time left, float right) |
Overload of binary / operator to scale a time value. More... | |
IME_API Time | operator/ (Time left, Int64 right) |
Overload of binary / operator to scale a time value. More... | |
IME_API Time & | operator/= (Time &left, float right) |
Overload of binary /= operator to scale/assign a time value. More... | |
IME_API Time & | operator/= (Time &left, Int64 right) |
Overload of binary /= operator to scale/assign a time value. More... | |
IME_API float | operator/ (Time left, Time right) |
Overload of binary / operator to compute the ratio of two time values. More... | |
IME_API Time | operator% (Time left, Time right) |
Overload of binary % operator to compute remainder of a time value. More... | |
IME_API Time & | operator%= (Time &left, Time right) |
Overload of binary %= operator to compute/assign remainder of a time value. More... | |
ime::Time::Time | ( | ) |
Default constructor.
Sets the time value to zero
Int64 ime::Time::asHours | ( | ) | const |
Get the time value in hours.
Int64 ime::Time::asMicroseconds | ( | ) | const |
Get the time value in microseconds.
Int32 ime::Time::asMilliseconds | ( | ) | const |
Get the time value in milliseconds.
Int64 ime::Time::asMinutes | ( | ) | const |
Get the time value in minutes.
Int64 ime::Time::asNanoseconds | ( | ) | const |
Get the time value in nanoseconds.
float ime::Time::asSeconds | ( | ) | const |
Get the time value in seconds.
|
related |
Construct a time value from a number of hours.
hours | Number of hours |
|
related |
Construct a time value from a number of microseconds.
microseconds | Number of microseconds |
|
related |
Construct a time value from a number of milliseconds.
milliseconds | Number of milliseconds |
|
related |
Construct a time value from a number of minutes.
minutes | Number of minutes |
|
related |
Construct a time value from a number of nanoseconds.
nanoseconds | Number of nanoseconds |
Overload of != operator to compare two time values.
left | Left operand (a time) |
right | Right operand (a time) |
Overload of binary % operator to compute remainder of a time value.
left | Left operand (a time) |
right | Right operand (a time) |
Overload of binary %= operator to compute/assign remainder of a time value.
left | Left operand (a time) |
right | Right operand (a time) |
Overload of binary * operator to scale a time value.
left | Left operand (a number) |
right | Right operand (a time) |
Overload of binary * operator to scale a time value.
left | Left operand (a number) |
right | Right operand (a time) |
Overload of binary * operator to scale a time value.
left | Left operand (a time) |
right | Right operand (a number) |
Overload of binary * operator to scale a time value.
left | Left operand (a time) |
right | Right operand (a number) |
Overload of binary *= operator to scale/assign a time value.
left | Left operand (a time) |
right | Right operand (a number) |
Overload of binary *= operator to scale/assign a time value.
left | Left operand (a time) |
right | Right operand (a number) |
Overload of binary + operator to add two time values.
left | Left operand (a time) |
right | Right operand (a time) |
Overload of binary += operator to add/assign two time values.
left | Left operand (a time) |
right | Right operand (a time) |
Overload of binary - operator to subtract two time values.
left | Left operand (a time) |
right | Right operand (a time) |
Overload of unary - operator to negate a time value.
right | Right operand (a time) |
Overload of binary -= operator to subtract/assign two time values.
left | Left operand (a time) |
right | Right operand (a time) |
Overload of binary / operator to scale a time value.
left | Left operand (a time) |
right | Right operand (a number) |
Overload of binary / operator to scale a time value.
left | Left operand (a time) |
right | Right operand (a number) |
Overload of binary / operator to compute the ratio of two time values.
left | Left operand (a time) |
right | Right operand (a time) |
Overload of binary /= operator to scale/assign a time value.
left | Left operand (a time) |
right | Right operand (a number) |
Overload of binary /= operator to scale/assign a time value.
left | Left operand (a time) |
right | Right operand (a number) |
Overload of < operator to compare two time values.
left | Left operand (a time) |
right | Right operand (a time) |
Overload of <= operator to compare two time values.
left | Left operand (a time) |
right | Right operand (a time) |
Overload of == operator to compare two time values.
left | Left operand (a time) |
right | Right operand (a time) |
Overload of > operator to compare two time values.
left | Left operand (a time) |
right | Right operand (a time) |
Overload of >= operator to compare two time values.
left | Left operand (a time) |
right | Right operand (a time) |
|
related |
Construct a time value from a number of seconds.
seconds | Number of seconds |
|
static |