![]() |
nCine
2025.04.r498-9d36345
A cross-platform 2D game engine
|
A class representing a point in time or a duration. More...
#include <TimeStamp.h>
Public Member Functions | |
TimeStamp () | |
Constructs a new time stamp initialized to the current clock value. | |
void | toNow () |
Sets the time stamp to the current clock value. | |
bool | operator> (const TimeStamp &other) const |
bool | operator< (const TimeStamp &other) const |
TimeStamp & | operator+= (const TimeStamp &other) |
TimeStamp & | operator-= (const TimeStamp &other) |
TimeStamp | operator+ (const TimeStamp &other) const |
TimeStamp | operator- (const TimeStamp &other) const |
TimeStamp | timeSince () const |
Returns a new time stamp with the time elapsed since this one. | |
float | secondsSince () const |
Returns the time elapsed since the timestamp, as seconds in a float number. | |
double | secondsDoubleSince () const |
Returns the time elapsed since the timestamp, as seconds in a double number. | |
float | millisecondsSince () const |
Returns the time elapsed since the timestamp, as milliseconds in a float number. | |
double | millisecondsDoubleSince () const |
Returns the time elapsed since the timestamp, as milliseconds in a double number. | |
float | microsecondsSince () const |
Returns the time elapsed since the timestamp, as microseconds in a float number. | |
double | microsecondsDoubleSince () const |
Returns the time elapsed since the timestamp, as microseconds in a double number. | |
float | nanosecondsSince () const |
Returns the time elapsed since the timestamp, as seconds in a nanoseconds number. | |
double | nanosecondsDoubleSince () const |
Returns the time elapsed since the timestamp, as seconds in a nanoseconds number. | |
uint64_t | ticks () const |
Returns the timestamp counter value (the number of ticks elapsed until now) | |
float | seconds () const |
Returns the timestamp counter value as seconds in a float number. | |
double | secondsDouble () const |
Returns the timestamp counter value as seconds in a double number. | |
float | milliseconds () const |
Returns the timestamp counter value as milliseconds in a float number. | |
double | millisecondsDouble () const |
Returns the timestamp counter value as milliseconds in a double number. | |
float | microseconds () const |
Returns the timestamp counter value as microseconds in a float number. | |
double | microsecondsDouble () const |
Returns the timestamp counter value as microseconds in a double number. | |
float | nanoseconds () const |
Returns the timestamp counter value as nanoseconds in a float number. | |
double | nanosecondsDouble () const |
Returns the timestamp counter value as nanoseconds in a double number. | |
Static Public Member Functions | |
static TimeStamp | now () |
Returns a new time stamp initialized to the current clock value. | |
A class representing a point in time or a duration.