Module time
Source - LocalTime
- Structure representing the date in local time with nanosecond precision.
- TimestampUs
- Holds a micro-second resolution timestamp with both the real time and cpu time.
- ClockType
- Wrapper over
libc::clockid_t
to specify Linux Kernel clock source.
- NANOS_PER_MILLISECOND
- Constant to convert milliseconds to nanoseconds.
- NANOS_PER_SECOND
- Constant to convert seconds to nanoseconds.
- get_time_ms
- Returns a timestamp in milliseconds based on the provided clock type.
- get_time_ns
- Returns a timestamp in nanoseconds based on the provided clock type.
- get_time_us
- Returns a timestamp in microseconds based on the provided clock type.
- now_cputime_us
- Get process CPU time in us.
- seconds_to_nanoseconds
- Converts a timestamp in seconds to an equivalent one in nanoseconds.
Returns
None
if the conversion overflows. - timestamp_cycles
- Returns a timestamp in nanoseconds from a monotonic clock.