4#include "../Foundation/PrimitiveTypes.h"
34 bool operator>(
const Milliseconds other)
const {
return ms > other.ms; }
35 bool operator<(
const Milliseconds other)
const {
return ms < other.ms; }
68 Relative(
double floatingSeconds) : floatingSeconds(floatingSeconds) {}
69 double floatingSeconds = 0;
82 Absolute(
int64_t millisecondsSinceEpoch) : millisecondsSinceEpoch(millisecondsSinceEpoch) {}
100 const char* getMonth()
const;
101 const char* getDay()
const;
102 bool isDaylightSaving =
false;
105 friend struct Internal;
unsigned char uint8_t
Platform independent (1) byte unsigned int.
Definition: PrimitiveTypes.h:36
long long int64_t
Platform independent (8) bytes signed int.
Definition: PrimitiveTypes.h:50
unsigned short uint16_t
Platform independent (2) bytes unsigned int.
Definition: PrimitiveTypes.h:37
Holds information on a parsed absolute time from Absolute::parseLocal.
Definition: Time.h:90
Absolute time represented with milliseconds since epoch.
Definition: Time.h:74
Relative subtract(Absolute other)
Obtain the Relative by subtracting this Absolute with another one.
static Absolute now()
Obtain Absolute representing current time.
Absolute(int64_t millisecondsSinceEpoch)
Construct an Absolute from milliseconds since epoch.
Definition: Time.h:82
bool parseUTC(ParseResult &result) const
Parses UTC time to a Parsed structure.
int64_t getMillisecondsSinceEpoch() const
Return given time as milliseconds since epoch.
Definition: Time.h:130
bool parseLocal(ParseResult &result) const
Parses local time to a Parsed structure.
An high resolution time counter.
Definition: Time.h:135
Relative subtractApproximate(HighResolutionCounter other) const
Subtracts another HighResolutionCounter from this one, returning an approximate Relative.
HighResolutionCounter offsetBy(Milliseconds ms) const
Returns a HighResolutionCounter offset by a given number of Milliseconds.
bool isLaterThanOrEqualTo(HighResolutionCounter other) const
Check if this HighResolutionCounter is later or equal to another HighResolutionCounter.
HighResolutionCounter & snap()
Sets HighResolutionCounter to current instant Example:
HighResolutionCounter subtractExact(HighResolutionCounter other) const
Subtracts another HighResolutionCounter from this one, returning a precise HighResolutionCounter.
Type-safe wrapper of uint64 used to represent milliseconds.
Definition: Time.h:29
Interval of time represented with 64 bit double precision float.
Definition: Time.h:50
Relative()
how many seconds have elapsed in
Definition: Time.h:52
static Relative fromSeconds(double seconds)
Construct a Relative from seconds.
Definition: Time.h:57
Milliseconds inRoundedUpperMilliseconds() const
Converts current time to Milliseconds, rounding to upper integer.
Definition: Time.h:61
Type-safe wrapper of uint64 used to represent seconds.
Definition: Time.h:40