nustack
ReferenceStd

nu.std.time

No central class - free functions over the process clock. Every clock read is non-deterministic. Async sibling of sleep lives in nu.std.asyncio.

from nu.std.time import monotonic, sleep

NameSortSignatureEffectMeaning
timeScalarQuerytime()non-detseconds since the epoch -> Float
monotonicScalarQuerymonotonic()non-detmonotonic clock, seconds -> Float
perf_counterScalarQueryperf_counter()non-dethighest-resolution timer, seconds -> Float
process_timeScalarQueryprocess_time()non-detprocess CPU time, seconds -> Float
time_nsScalarQuerytime_ns()non-detseconds since the epoch, nanoseconds -> Int
monotonic_nsScalarQuerymonotonic_ns()non-detmonotonic clock, nanoseconds -> Int
perf_counter_nsScalarQueryperf_counter_ns()non-dethighest-resolution timer, nanoseconds -> Int
sleepScalarQuerysleep(secs)non-det, sync-onlyblock for secs seconds, yields None