Mountain
1.0.0
Simple C++ 2D Game Framework
|
C++ reimplementation of the .NET TimeSpan struct. More...
#include <time_span.hpp>
Public Member Functions | |
constexpr | TimeSpan (int64_t ticks) |
constexpr | TimeSpan (int32_t hours, int32_t minutes, int32_t seconds) |
constexpr | TimeSpan (int32_t days, int32_t hours, int32_t minutes, int32_t seconds, int32_t milliseconds=0, int32_t microseconds=0) |
int32_t | GetDays () const |
int32_t | GetHours () const |
int32_t | GetMinutes () const |
int32_t | GetSeconds () const |
int32_t | GetMilliseconds () const |
int32_t | GetMicroseconds () const |
int32_t | GetNanoseconds () const |
double_t | GetTotalDays () const |
double_t | GetTotalHours () const |
double_t | GetTotalMinutes () const |
double_t | GetTotalSeconds () const |
double_t | GetTotalMilliseconds () const |
double_t | GetTotalMicroseconds () const |
double_t | GetTotalNanoseconds () const |
TimeSpan | Duration () const |
Static Public Member Functions | |
static constexpr TimeSpan | Zero () |
static constexpr TimeSpan | MaxValue () |
static constexpr TimeSpan | MinValue () |
static TimeSpan | FromDays (double_t days) |
static TimeSpan | FromHours (double_t hours) |
static TimeSpan | FromMinutes (double_t minutes) |
static TimeSpan | FromSeconds (double_t seconds) |
static TimeSpan | FromMilliseconds (double_t milliseconds) |
static TimeSpan | FromMicroseconds (double_t microseconds) |
static TimeSpan | FromTicks (int64_t ticks) |
Static Public Attributes | |
static constexpr int64_t | NanosecondsPerTick = 100 |
Represents the number of nanoseconds per tick. | |
static constexpr int64_t | TicksPerMicrosecond = 10 |
Represents the number of ticks in 1 microsecond. | |
static constexpr int64_t | TicksPerMillisecond = TicksPerMicrosecond * 1000 |
Represents the number of ticks in 1 millisecond. | |
static constexpr int64_t | TicksPerSecond = TicksPerMillisecond * 1000 |
Represents the number of ticks in 1 second. | |
static constexpr int64_t | TicksPerMinute = TicksPerSecond * 60 |
Represents the number of ticks in 1 minute. | |
static constexpr int64_t | TicksPerHour = TicksPerMinute * 60 |
Represents the number of ticks in 1 hour. | |
static constexpr int64_t | TicksPerDay = TicksPerHour * 24 |
Represents the number of ticks in 1 day. | |
Friends | |
auto | operator (TimeSpan, TimeSpan)=default |
TimeSpan | operator+ (TimeSpan a, TimeSpan b) |
TimeSpan | operator- (TimeSpan v) |
TimeSpan | operator- (TimeSpan a, TimeSpan b) |
TimeSpan | operator* (TimeSpan v, double_t factor) |
TimeSpan | operator* (double_t factor, TimeSpan v) |
TimeSpan | operator/ (TimeSpan v, double_t divisor) |
double_t | operator/ (TimeSpan a, TimeSpan b) |
TimeSpan & | operator+= (TimeSpan &a, TimeSpan b) |
TimeSpan & | operator-= (TimeSpan &a, TimeSpan b) |
TimeSpan & | operator*= (TimeSpan &v, double_t factor) |
TimeSpan & | operator/= (TimeSpan &v, double_t divisor) |
std::ostream & | operator<< (std::ostream &out, const TimeSpan &timeSpan) |
C++ reimplementation of the .NET TimeSpan struct.
Represents a time interval.
Definition at line 13 of file time_span.hpp.