Typed system clock access.
Construct instances of both the real and monotonic clocks and provide access via elapsed, utc, local, and date.
tools
constants0
types0
_fault_clocks0
_fault_clocks(module, delta)
_stdlib_clocks80%
_stdlib_clocks(module, delta)
setup350%
setup()
_unix0
_unix(ut)
zone0
zone(selector)
Using the zone definitions provided by the system, construct a view for the time zone identified by selector.
zoneParameters
selectorThe zone's identifier. If None, the system default zone will be used.
utc0types.Timestamp
utc()
Get the current time according to the system's real clock.
local0types.Timestamp
local()
Get the current time according to the system's real clock and the default time zone configured by the system.
The applied offset returned by views.Zone.localize is discarded by this function, and, therefore, it should only be used in cases where it is acceptable for the timestamp to be represented without a time zone.
The default zone can be changed by overriding the zone function.
date0types.Date
date(delta)
Using local, identify the current date.
dateParameters
elapsed0types.Measure
elapsed()
Snapshot of the system's monotonic clock.