eio.mock
Eio_mock.Clock
A mock Eio.Time clock for testing timeouts.
Eio.Time
eio
eio.core
eio.unix
eio.utils
module type S = sig ... end
include S with type time := float
type t = < float Eio.Time.clock_base ; advance : unit ; set_time : float -> unit >
val make : unit -> t
make () is a new clock.
make ()
The time is initially set to 0.0 and doesn't change except when you call advance or set_time.
advance
set_time
val advance : t -> unit
advance t sets the time to the next scheduled event (adding any due fibers to the run queue).
advance t
Invalid_argument
if nothing is scheduled.
val set_time : t -> float -> unit
set_time t time sets the time to time (adding any due fibers to the run queue).
set_time t time
time
module Mono : S with type time := Mtime.t