Time.Timeout
Timeout values.
val v : _ Mono.t -> Mtime.Span.t -> t
v clock duration
is a timeout of duration
, as measured by clock
. Internally, this is just the tuple (clock, duration)
.
seconds clock duration
is a timeout of duration
seconds, as measured by clock
.
val none : t
none
is an infinite timeout.
run t fn
runs fn ()
but cancels it if it takes longer than allowed by timeout t
.