Time¶
A collection of ways to fetch the current time.
Constructors¶
create¶
Returns¶
- Time val^
Public Functions¶
now¶
The wall-clock adjusted system time with nanoseconds. Return: (seconds, nanoseconds)
Returns¶
seconds¶
The wall-clock adjusted system time.
Returns¶
- I64 val
millis¶
Monotonic unadjusted milliseconds.
Returns¶
- U64 val
micros¶
Monotonic unadjusted microseconds.
Returns¶
- U64 val
nanos¶
Monotonic unadjusted nanoseconds.
Returns¶
- U64 val
cycles¶
Processor cycle count. Don't use this for performance timing, as it does not control for out-of-order execution.
Returns¶
- U64 val
perf_begin¶
Get a cycle count for beginning a performance testing block. This will will prevent instructions from before this call leaking into the block and instructions after this call being executed earlier.
Returns¶
- U64 val
perf_end¶
Get a cycle count for ending a performance testing block. This will will prevent instructions from after this call leaking into the block and instructions before this call being executed later.
Returns¶
- U64 val
eq¶
Parameters¶
- that: Time val
Returns¶
- Bool val
ne¶
Parameters¶
- that: Time val
Returns¶
- Bool val