CTR Pia
4.11.3
Game Communication Engine
|
Class for representing time spans. This class can perform type conversions with numeric values in milliseconds. More...
Public Member Functions | |
TimeSpan () | |
Default constructor. | |
TimeSpan (s32 msec) | |
Constructor that initializes the instance from a numeric value representing milliseconds. More... | |
TimeSpan (s64 msec) | |
Constructor that initializes the instance from a numeric value representing milliseconds. More... | |
TimeSpan (const TimeSpan &rhs) | |
Copy constructor. More... | |
s32 | GetMSec () const |
Gets the time in milliseconds as an s32 value. More... | |
s64 | GetMSecS64 () const |
Gets the time in milliseconds as an s64 value. More... | |
s32 | GetSec () const |
Gets the time in seconds as an s32 value. More... | |
f32 | GetSecF32 () const |
Gets the time in seconds as an f32 value. More... | |
s64 | GetSecS64 () const |
Gets the time in seconds as an s64 value. More... | |
operator s32 () const | |
An operator that converts a time object to an s32 value in milliseconds. More... | |
operator s64 () const | |
An operator that converts a time object to an s64 value in milliseconds. More... | |
bool | operator!= (const TimeSpan &rhs) const |
Equality operator. It determines whether two TimeSpan objects differ. More... | |
bool | operator!= (s32 rhs) const |
Equality operator. Determines whether two TimeSpan objects differ. More... | |
bool | operator!= (s64 rhs) const |
Equality operator. Determines whether two TimeSpan objects differ. More... | |
TimeSpan | operator+ (const TimeSpan &rhs) const |
Calculates a TimeSpan object holding the amount of time added to this instance. More... | |
TimeSpan & | operator+= (const TimeSpan &rhs) |
Adds time to this instance. More... | |
TimeSpan | operator- (const TimeSpan &rhs) const |
Calculates a TimeSpan object holding the amount of time subtracted from this instance. More... | |
TimeSpan & | operator-= (const TimeSpan &rhs) |
Subtracts time from this instance. More... | |
bool | operator< (const TimeSpan &rhs) const |
Comparison operator. Returns true if the time represented by this instance is shorter; otherwise, returns false . More... | |
bool | operator< (s32 rhs) const |
Comparison operator. Returns true if the time represented by this instance is shorter; otherwise, returns false . More... | |
bool | operator< (s64 rhs) const |
Comparison operator. Returns true if the time represented by this instance is shorter; otherwise, returns false . More... | |
bool | operator<= (const TimeSpan &rhs) const |
Comparison operator. Returns true if the time represented by this instance is less than or equal, and false otherwise. More... | |
bool | operator<= (s32 rhs) const |
Comparison operator. Returns true if the time represented by this instance is less than or equal, and false otherwise. More... | |
bool | operator<= (s64 rhs) const |
Comparison operator. Returns true if the time represented by this instance is less than or equal, and false otherwise. More... | |
TimeSpan & | operator= (const TimeSpan &rhs) |
Assignment operator. More... | |
TimeSpan & | operator= (s32 msec) |
An operator that assigns a numeric value in milliseconds. More... | |
TimeSpan & | operator= (s64 msec) |
An operator that assigns a numeric value in milliseconds. More... | |
bool | operator== (const TimeSpan &rhs) const |
Equality operator. It determines whether two TimeSpan objects are equal. More... | |
bool | operator== (s32 rhs) const |
Equality operator. It determines whether two TimeSpan objects are equal. More... | |
bool | operator== (s64 rhs) const |
Equality operator. Determines whether two TimeSpan objects are equal. More... | |
bool | operator> (const TimeSpan &rhs) const |
Comparison operator. Returns true if the time represented by this instance is longer; otherwise returns false . More... | |
bool | operator> (s32 rhs) const |
Comparison operator. Returns true if the time represented by this instance is longer; otherwise returns false . More... | |
bool | operator> (s64 rhs) const |
Comparison operator. Returns true if the time represented by this instance is longer; otherwise returns false . More... | |
bool | operator>= (const TimeSpan &rhs) const |
Comparison operator. Returns true if the time represented by this instance is greater than or equal; otherwise returns false . More... | |
bool | operator>= (s32 rhs) const |
Comparison operator. Returns true if the time represented by this instance is greater than or equal; otherwise returns false . More... | |
bool | operator>= (s64 rhs) const |
Comparison operator. Returns true if the time represented by this instance is greater than or equal; otherwise returns false . More... | |
void | SetFromMSec (s32 msec) |
Sets the time in milliseconds from an s32 value. More... | |
void | SetFromMSec (s64 msec) |
Sets the time in milliseconds from an s64 value. More... | |
void | SetFromSec (s32 sec) |
Sets the time in seconds from an s32 value. More... | |
void | SetFromSec (s64 sec) |
Sets the time in seconds from an s64 value. More... | |
void | SetFromSec (f32 sec) |
Sets the time in seconds from an f32 value. More... | |
void | Trace (u64 flag) const |
Prints information useful for debugging. More... | |
Class for representing time spans. This class can perform type conversions with numeric values in milliseconds.
2012-07-12 Added support so that this instance can be initialized as a static variable without problems.
2012-05-24 Added the addition and subtraction operators to the TimeSpan
class.
2012-04-20 Initial version.
|
inline |
Constructor that initializes the instance from a numeric value representing milliseconds.
[in] | msec | Specifies the initial value, in milliseconds. |
|
inline |
Constructor that initializes the instance from a numeric value representing milliseconds.
[in] | msec | Specifies the initial value, in milliseconds. |
|
inline |
Copy constructor.
[in] | rhs | A TimeSpan instance that holds the values used to initialize this instance. |
|
inline |
Gets the time in milliseconds as an s32
value.
|
inline |
Gets the time in milliseconds as an s64
value.
|
inline |
Gets the time in seconds as an s32
value.
|
inline |
Gets the time in seconds as an f32
value.
|
inline |
Gets the time in seconds as an s64
value.
|
inline |
An operator that converts a time object to an s32
value in milliseconds.
|
inline |
An operator that converts a time object to an s64
value in milliseconds.
|
inline |
|
inline |
Equality operator. Determines whether two TimeSpan
objects differ.
[in] | rhs | An s32 value in milliseconds to compare with. |
true
if they represent different times, and false
otherwise.
|
inline |
Equality operator. Determines whether two TimeSpan
objects differ.
[in] | rhs | An s64 value in milliseconds to compare with. |
true
if they represent different times, and false
otherwise. Adds time to this instance.
[in] | rhs | The time span to add. |
Subtracts time from this instance.
[in] | rhs | The time span to subtract. |
|
inline |
Comparison operator. Returns true
if the time represented by this instance is shorter; otherwise, returns false
.
[in] | rhs | The TimeSpan instance to compare with. |
true
if the time represented by this instance is shorter, and false
otherwise.
|
inline |
Comparison operator. Returns true
if the time represented by this instance is shorter; otherwise, returns false
.
[in] | rhs | An s32 value in milliseconds to compare with. |
true
if the time represented by this instance is shorter, and false
otherwise.
|
inline |
Comparison operator. Returns true
if the time represented by this instance is shorter; otherwise, returns false
.
[in] | rhs | An s64 value in milliseconds to compare with. |
true
if the time represented by this instance is shorter, and false
otherwise.
|
inline |
Comparison operator. Returns true
if the time represented by this instance is less than or equal, and false
otherwise.
[in] | rhs | The TimeSpan instance to compare with. |
true
if the time represented by this instance is less than or equal, and false
otherwise.
|
inline |
Comparison operator. Returns true
if the time represented by this instance is less than or equal, and false
otherwise.
[in] | rhs | An s32 value in milliseconds to compare with. |
true
if the time represented by this instance is less than or equal, and false
otherwise.
|
inline |
Comparison operator. Returns true
if the time represented by this instance is less than or equal, and false
otherwise.
[in] | rhs | An s64 value in milliseconds to compare with. |
true
if the time represented by this instance is less than or equal, and false
otherwise. Assignment operator.
[in] | rhs | The TimeSpan instance to assign to this instance. |
|
inline |
An operator that assigns a numeric value in milliseconds.
[in] | msec | The time in milliseconds. |
|
inline |
An operator that assigns a numeric value in milliseconds.
[in] | msec | The time in milliseconds. |
|
inline |
|
inline |
Equality operator. It determines whether two TimeSpan
objects are equal.
[in] | rhs | An s32 value in milliseconds to compare with. |
true
if they represent the same time, and false
otherwise.
|
inline |
Equality operator. Determines whether two TimeSpan
objects are equal.
[in] | rhs | An s64 value in milliseconds to compare with. |
true
if they represent the same time, and false
otherwise.
|
inline |
Comparison operator. Returns true
if the time represented by this instance is longer; otherwise returns false
.
[in] | rhs | The TimeSpan instance to compare with. |
true
if the time represented by this instance is longer, and false
otherwise.
|
inline |
Comparison operator. Returns true
if the time represented by this instance is longer; otherwise returns false
.
[in] | rhs | An s32 value in milliseconds to compare with. |
true
if the time represented by this instance is longer, and false
otherwise.
|
inline |
Comparison operator. Returns true
if the time represented by this instance is longer; otherwise returns false
.
[in] | rhs | An s64 value in milliseconds to compare with. |
true
if the time represented by this instance is longer, and false
otherwise.
|
inline |
Comparison operator. Returns true
if the time represented by this instance is greater than or equal; otherwise returns false
.
[in] | rhs | The TimeSpan instance to compare with. |
true
if the time represented by this instance is greater than or equal, and false
otherwise.
|
inline |
Comparison operator. Returns true
if the time represented by this instance is greater than or equal; otherwise returns false
.
[in] | rhs | An s32 value in milliseconds to compare with. |
true
if the time represented by this instance is greater than or equal, and false
otherwise.
|
inline |
Comparison operator. Returns true
if the time represented by this instance is greater than or equal; otherwise returns false
.
[in] | rhs | An s64 value in milliseconds to compare with. |
true
if the time represented by this instance is greater than or equal, and false
otherwise.
|
inline |
Sets the time in milliseconds from an s32
value.
[in] | msec | The time in milliseconds. |
|
inline |
Sets the time in milliseconds from an s64
value.
[in] | msec | The time in milliseconds. |
|
inline |
Sets the time in seconds from an s32
value.
[in] | sec | The time in seconds. |
|
inline |
Sets the time in seconds from an s64
value.
[in] | sec | The time in seconds. |
|
inline |
Sets the time in seconds from an f32
value.
[in] | sec | The time in seconds. |
void nn::pia::common::TimeSpan::Trace | ( | u64 | flag | ) | const |
Prints information useful for debugging.
[in] | flag | Bitwise OR of trace flags. For more information, see the TraceFlag type. |