module Make_suspension_resistant:
Given a watcher w
:
Tick.LIFECYCLE.suspend
event while
Tick.WATCHER.waiting
w
is true
, the value of
Tick.WATCHER.linger_ns
w
is an accurate and exact wall-clock time
span.Tick.LIFECYCLE.suspend
and
Tick.LIFECYCLE.resume
events while Tick.WATCHER.waiting
w
is true
and that the difference between the value of Tick.PCLOCK.now_d_ps
at these events provides an accurate measure of the actual wall-clock
time span that elapsed during suspension, the value of
Tick.WATCHER.linger_ns
w
is an accurate and exact wall-clock time
span.
This condition is typically satisfied if Tick.PCLOCK
is well synchronized
at Tick.LIFECYCLE.suspend
and Tick.LIFECYCLE.resume
and no leap second
occurs between these two events. The absolute value of Tick.PCLOCK
doesn't
matter.
Tick.LIFECYCLE.poweroff
event.Parameters: |
|
type
t
typetrigger =
t -> unit
include Tick.WATCHER