Class that represents time.
More...
Class that represents time.
- Revision History:
2012-06-06 Made the class inherit from RootObject
.
2012-04-20 Changed the internal representation to be a direct representation of a system tick. Consequently, removed Time(u64)
and operator u64
, which handled the raw values directly.
2012-04-20 Added a TimeSpan
class to represent time spans (deltas). The arguments and return values of operators that handle time spans have been changed to instances of the TimeSpan
class.
2012-04-20 Added the SetNow
function.
2012-04-20 Removed ConvertFromSeconds
and ConvertToSeconds
functions, and gave equivalent functionality to TimeSpan::SetFromSec(f32)
and TimeSpan::GetSecF32
functions.
2012-04-13 Changed the specifications of GetTime
function to return the time elapsed since the nn::pia::common::Initialize
function was called.
2012-04-13 Removed the Reset
function.
2012-04-13 The nn::pia::common::Initialize
and nn::pia::common::Finalize
functions now initialize and finalize the Time
class.
2012-04-04 Initial version.
nn::pia::common::Time::Time |
( |
const Time & |
rhs | ) |
|
|
inline |
Copy constructor.
- Parameters
-
[in] | rhs | A Time instance that holds the value used to initialize this instance. |
static Time nn::pia::common::Time::GetTime |
( |
| ) |
|
|
inlinestatic |
Gets a Time
instance representing the current time.
- Returns
- A
Time
instance representing the current time.
bool nn::pia::common::Time::operator!= |
( |
const Time & |
rhs | ) |
const |
|
inline |
Equality operator. Determines whether two Time
objects differ.
- Parameters
-
[in] | rhs | The Time instance to compare with. |
- Returns
true
if they represent different times, and false
otherwise.
Time nn::pia::common::Time::operator+ |
( |
const TimeSpan & |
span | ) |
const |
|
inline |
Calculates a Time
object holding the amount of time added to this instance.
- Parameters
-
- Returns
- A
Time
representing the amount of time that was added.
Time& nn::pia::common::Time::operator+= |
( |
const TimeSpan & |
span | ) |
|
|
inline |
Adds time to this instance's time.
- Parameters
-
- Returns
- Returns a reference to this instance.
Time nn::pia::common::Time::operator- |
( |
const TimeSpan & |
span | ) |
const |
|
inline |
Calculates a Time
object holding the amount of time subtracted from this instance.
- Parameters
-
[in] | span | The time to subtract. |
- Returns
- A
Time
representing the amount of time that was subtracted.
TimeSpan nn::pia::common::Time::operator- |
( |
const Time & |
rhs | ) |
const |
|
inline |
Calculates a time delta.
- Parameters
-
- Returns
- A
TimeSpan
object representing the time delta.
Time& nn::pia::common::Time::operator-= |
( |
const TimeSpan & |
span | ) |
|
|
inline |
Subtracts time from this instance.
- Parameters
-
[in] | span | The time to subtract. |
- Returns
- Returns a reference to this instance.
bool nn::pia::common::Time::operator< |
( |
const Time & |
rhs | ) |
const |
|
inline |
Comparison operator. Returns true
if this instance is earlier.
- Parameters
-
[in] | rhs | The Time instance to compare with. |
- Returns
true
if this instance is earlier, and false
otherwise.
bool nn::pia::common::Time::operator<= |
( |
const Time & |
rhs | ) |
const |
|
inline |
Comparison operator. Returns true
if this instance is earlier or equal.
- Parameters
-
[in] | rhs | The Time instance to compare with. |
- Returns
true
if this instance is earlier or equal, and false
otherwise.
Time& nn::pia::common::Time::operator= |
( |
const Time & |
rhs | ) |
|
|
inline |
Assignment operator.
- Parameters
-
[in] | rhs | The Time instance to assign to this instance. |
- Returns
- Returns a reference to this instance.
bool nn::pia::common::Time::operator== |
( |
const Time & |
rhs | ) |
const |
|
inline |
Equality operator. Determines whether two Time
objects are equal.
- Parameters
-
[in] | rhs | The Time instance to compare with. |
- Returns
- Returns
true
if they represent the same time, and false
otherwise.
bool nn::pia::common::Time::operator> |
( |
const Time & |
rhs | ) |
const |
|
inline |
Comparison operator. Returns true
if this instance is later.
- Parameters
-
[in] | rhs | The Time instance to compare with. |
- Returns
true
if this instance is later, and false
otherwise.
bool nn::pia::common::Time::operator>= |
( |
const Time & |
rhs | ) |
const |
|
inline |
Comparison operator. Returns true
if this instance is later or equal.
- Parameters
-
[in] | rhs | The Time instance to compare with. |
- Returns
true
if this instance is later or equal, and false
otherwise.
void nn::pia::common::Time::Trace |
( |
u64 |
flag | ) |
const |
Prints information useful for debugging.
- Parameters
-
[in] | flag | Specifies the bitwise OR of trace flags. For more information, see the TraceFlag type. |