nlib
|
The class for representing the time. More...
#include "nn/nlib/DateTime.h"
Public Member Functions | |
void | Get (int *days, int *seconds, int *milliseconds, int *microseconds) noexcept |
Gets the time, separated out into units of days, seconds, milliseconds, and microseconds. More... | |
TimeValue | ToTimeValue () const noexcept |
Converts to a TimeValue object. | |
int | ToDays () const noexcept |
Returns the time in terms of a number of days. Fractions are truncated. | |
int | ToHours () const noexcept |
Returns the time span as a number of hours. Fractions are truncated. | |
int64_t | ToMinutes () const noexcept |
Returns the time as a number of minutes. Fractions are truncated. | |
int64_t | ToSeconds () const noexcept |
Returns the time in terms of a number of seconds. Fractions are truncated. | |
int64_t | ToMilliSeconds () const noexcept |
Returns the time in terms of a number of milliseconds. Fractions are truncated. | |
int64_t | ToMicroSeconds () const noexcept |
Returns the time in terms of a number of microseconds. Fractions are truncated. | |
TimeSpan (const struct timespec *tm) noexcept | |
Instantiates the object from the timespec structure. | |
void | ToTimeSpec (struct timespec *tm) const noexcept |
Converts to a value of the timespec structure. | |
TimeSpan & | operator+= (const TimeSpan &rhs) noexcept |
Adds time. | |
TimeSpan & | operator-= (const TimeSpan &rhs) noexcept |
Subtracts time. | |
TimeSpan & | operator*= (int i) noexcept |
Multiplies the time by i. | |
TimeSpan & | operator*= (double d) noexcept |
Multiplies the time by d. | |
TimeSpan | operator- () const noexcept |
A unary operator. | |
TimeSpan | operator+ () const noexcept |
A unary operator. | |
bool | operator== (const TimeSpan &rhs) const noexcept |
Returns true if the time is the same. | |
bool | operator!= (const TimeSpan &rhs) const noexcept |
Returns true if the time is different. | |
bool | operator< (const TimeSpan &rhs) const noexcept |
Returns true if smaller than rhs. | |
bool | operator> (const TimeSpan &rhs) const noexcept |
Returns true if larger than rhs. | |
bool | operator<= (const TimeSpan &rhs) const noexcept |
Returns true if equal to or smaller than rhs. | |
bool | operator>= (const TimeSpan &rhs) const noexcept |
Returns true if equal to or larger than rhs. | |
Basic Member Functions | |
constexpr | TimeSpan () noexcept |
Instantiates the object and initializes the time to 0. | |
TimeSpan (const TimeValue &rhs) noexcept | |
Initializes using a TimeValue object. | |
constexpr | TimeSpan (int days) noexcept |
Initializes the object with a number of days specified for the period of time. More... | |
constexpr | TimeSpan (int days, int seconds) noexcept |
Initializes the object with a number of days and a number of seconds specified for the period of time. More... | |
constexpr | TimeSpan (int days, int seconds, int milliseconds, int microseconds=0) noexcept |
Initializes the object with a number of days, seconds, milliseconds, and microseconds specified for the period of time. More... | |
The class for representing the time.
TimeSpan
objects. Definition at line 106 of file DateTime.h.
|
inlineexplicitnoexcept |
Initializes the object with a number of days specified for the period of time.
[in] | days | A number of days. |
Definition at line 110 of file DateTime.h.
|
inlinenoexcept |
Initializes the object with a number of days and a number of seconds specified for the period of time.
[in] | days | A number of days. |
[in] | seconds | A number of seconds. |
Definition at line 112 of file DateTime.h.
|
inlinenoexcept |
Initializes the object with a number of days, seconds, milliseconds, and microseconds specified for the period of time.
[in] | days | A number of days. |
[in] | seconds | Seconds. |
[in] | milliseconds | Milliseconds. |
[in] | microseconds | Microseconds. |
Definition at line 115 of file DateTime.h.
|
noexcept |
Gets the time, separated out into units of days, seconds, milliseconds, and microseconds.
[out] | days | Sets the number of days. |
[out] | seconds | Sets the number of seconds. |
[out] | milliseconds | Sets the number of milliseconds. |
[out] | microseconds | Sets the number of microseconds. |
© 2012-2017 Nintendo Co., Ltd. All rights reserved.