Platform-agnostic monotonic clock.
More...
#include <Time.h>
Platform-agnostic monotonic clock.
Definition at line 24 of file Time.h.
◆ diffMicrosecs()
| static uint32_t SystemTime::diffMicrosecs |
( |
Ticks | start, |
|
|
Ticks | end ) |
|
inlinestatic |
- Returns
- whole microseconds elapsed between two now() samples. This is the granularity an emulator core's frame-sync loop actually needs.
- Parameters
-
| start | the earlier sample |
| end | the later sample - must not be earlier than start |
Definition at line 66 of file Time.h.
◆ diffMillisecs()
| static uint32_t SystemTime::diffMillisecs |
( |
Ticks | start, |
|
|
Ticks | end ) |
|
inlinestatic |
- Returns
- whole milliseconds elapsed between two now() samples
- Parameters
-
| start | the earlier sample |
| end | the later sample - must not be earlier than start |
Definition at line 52 of file Time.h.
◆ diffSecs()
| static uint32_t SystemTime::diffSecs |
( |
Ticks | start, |
|
|
Ticks | end ) |
|
inlinestatic |
- Returns
- whole seconds elapsed between two now() samples
- Parameters
-
| start | the earlier sample |
| end | the later sample - must not be earlier than start |
Definition at line 40 of file Time.h.
◆ now()
| static Ticks SystemTime::now |
( |
| ) |
|
|
inlinestatic |
- Returns
- the current monotonic timestamp
Definition at line 28 of file Time.h.
◆ ticksToMicrosecs()
| static uint64_t SystemTime::ticksToMicrosecs |
( |
Ticks | ticks | ) |
|
|
inlinestatic |
- Returns
- an already-elapsed raw tick COUNT (not two timestamps to diff) converted to microseconds, as a 64-bit value. Unlike diffMicrosecs() above, this is meant for converting an accumulator that has been summing raw (end - start) tick deltas across many samples - the accumulated total can exceed what diffMicrosecs()'s 32-bit microsecond return can hold long before any single sample would.
- Parameters
-
| ticks | an elapsed duration, in the same units as Ticks |
Definition at line 83 of file Time.h.
The documentation for this class was generated from the following file: