Skip to main content

wall_clock

Function wall_clock 

Source
pub fn wall_clock(ctx: &ServiceContext) -> Option<(i64, ClockSource)>
Expand description

The time service’s clock: epoch seconds, and where they came from (clock_source explains the four answers). None when there is no clock or time did not answer, which oblige a caller to the same thing: not to treat any number as the date.

For a program that must CHECK a date - a certificate’s validity, a signature’s freshness - rather than show one. A Floor reading is a lower bound: a date it calls “not yet valid” may be real, and a caller says which clock it used.