module CCTimer:sig..end
Used to be part of CCFuture
Since 0.16
type t
val create : unit -> t val set_exn_handler : t -> (exn -> unit) -> unitset_exn_handler timer f registers f so that any exception
raised by a task scheduled in timer is given to fexception Stopped
val after : t -> float -> f:(unit -> 'a) -> unitf after the given number of seconds.Stopped if the timer was stoppedval at : t -> float -> f:(unit -> 'a) -> unit() at the given Unix timestampStopped if the timer was stoppedexception ExitEvery
val every : ?delay:float -> t -> float -> f:(unit -> 'a) -> unitevery timer n ~f calls f () every n seconds.
f() can raise ExitEvery to stop the cycle.Stopped if the timer was stoppeddelay : if provided, the first call to f () is delayed by
that many seconds.val stop : t -> unitval active : t -> booltrue until stop t has been called.