An high resolution time counter. More...
#include <Time.h>
Public Member Functions | |
HighResolutionCounter & | snap () |
Sets HighResolutionCounter to current instant Example: | |
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. | |
Relative | subtractApproximate (HighResolutionCounter other) const |
Subtracts another HighResolutionCounter from this one, returning an approximate Relative. | |
HighResolutionCounter | subtractExact (HighResolutionCounter other) const |
Subtracts another HighResolutionCounter from this one, returning a precise HighResolutionCounter. | |
Relative | getRelative () const |
Converts to a Relative struct. | |
Nanoseconds | toNanoseconds () const |
Converts to Nanoseconds. | |
Milliseconds | toMilliseconds () const |
Converts to Milliseconds. | |
Seconds | toSeconds () const |
Converts to Seconds. | |
An high resolution time counter.
|
nodiscard |
Check if this HighResolutionCounter is later or equal to another HighResolutionCounter.
other | The HighResolutionCounter to be used in the comparison |
true
if this HighResolutionCounter is later or equal to another HighResolutionCounter
|
nodiscard |
Returns a HighResolutionCounter offset by a given number of Milliseconds.
ms | How many Milliseconds the returned HighResolutionCounter must be offset of |
ms
HighResolutionCounter & SC::Time::HighResolutionCounter::snap | ( | ) |
Sets HighResolutionCounter to current instant
Example:
|
nodiscard |
Subtracts another HighResolutionCounter from this one, returning an approximate Relative.
other | The HighResolutionCounter to be subtracted |
|
nodiscard |
Subtracts another HighResolutionCounter from this one, returning a precise HighResolutionCounter.
other | The HighResolutionCounter to be subtracted |
Milliseconds SC::Time::HighResolutionCounter::toMilliseconds | ( | ) | const |
Converts to Milliseconds.
Nanoseconds SC::Time::HighResolutionCounter::toNanoseconds | ( | ) | const |
Converts to Nanoseconds.