The current instantstd/time/instant/instant: V
in time as returned by the system clock
in the UTC timescale. Equivalent to now-instd/time/chrono/now-in: (ts : ? timescale) -> ndet instant(utcstd/time/utc/utc: () -> utc timescale())
, see
now-instd/time/chrono/now-in: (ts : ? timescale) -> ndet instant
for further information about the system clock.
The current instantstd/time/instant/instant: V
in time as returned by the system clock
in an optional time scale ts
(= ts-tistd/time/utc/ts-ti: timescale
).
This uses the best available system clock for the requested
timescale. For example
it uses CLOCK_UTC
when available to get proper UTC time, or CLOCK_TAI
for TAI time.
Otherwise, it usually uses Unix (POSIX) time (CLOCK_REALTIME
).
Unfortunately, most operating systems cannot not report time in leap
seconds accurately. The nowstd/time/chrono/now: () -> <ndet,utc> instant
function is limited by the OS in this case.
To guard against inaccurate clocks and increase monotonicity,
the nowstd/time/chrono/now: () -> <ndet,utc> instant
function guarantees that if the current measurement is
upto 1 second in the past with regard to the previous call to nowstd/time/chrono/now: () -> <ndet,utc> instant
,
that the returned instant is monotonic by adding nano seconds to the
previous measurement until the system clock catches up again.
This is effective in particular on older OS's where the time sometimes jumps back one second after a leap second. By limiting the adjustment to at most one second it ensures the clock catches up soon and does not affect the user setting a new time in the past.
Return the smallest time difference that the system clock can measure.
Get the system time.
.