Module Eio.TimeSource
Clocks, time, sleeping and timeouts.
now t is the current time since 00:00:00 GMT, Jan. 1, 1970 - in seconds - according to t.
sleep_until t time waits until the given time is reached.
sleep t d waits for d seconds.
Timeouts
Source
val with_timeout :
_ Eio.Time.clock ->
float ->
(unit -> ('a, 'e) Stdlib.result) ->
('a, [> `Timeout ] as 'e) Stdlib.resultwith_timeout clock d fn runs fn () but cancels it after d seconds.
with_timeout_exn clock d fn runs fn () but cancels it after d seconds, raising exception Timeout.