time
This module provides functions for working with time.
| Name | Summary |
|---|---|
| perfCounter | Returns the value of a high-resolution performance counter as a float (seconds since program start). |
| sleep | Pauses execution for the specified number of seconds. |
| time | Returns the current Unix timestamp as a float (seconds since epoch). |
| timeMs | Returns the current Unix timestamp in milliseconds as a float. |
| timeNs | Returns the current Unix timestamp in nanoseconds as a float. |
fn perfCounter() -> float
Returns the value of a high-resolution performance counter as a float (seconds since program start).
Returns
float
fn sleep(seconds) -> null
Pauses execution for the specified number of seconds.
Parameters
| seconds | The number of seconds to sleep. |
null
fn time() -> float
Returns the current Unix timestamp as a float (seconds since epoch).
Returns
float
fn timeMs() -> float
Returns the current Unix timestamp in milliseconds as a float.
Returns
float
fn timeNs() -> float
Returns the current Unix timestamp in nanoseconds as a float.
Returns
float