CCTimerEvent timer
Used to be part of CCFuture.
val create : unit -> tA new timer.
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 f.
val after : t -> float -> f:(unit -> _) -> unitCall the callback f after the given number of seconds.
val at : t -> float -> f:(unit -> _) -> unitCreate a future that evaluates to () at the given Unix timestamp.
val every : ?delay:float -> t -> float -> f:(unit -> _) -> unitevery timer n ~f calls f () every n seconds. f() can raise ExitEvery to stop the cycle.
val stop : t -> unitStop the given timer, cancelling pending tasks. Idempotent. From now on, calling most other operations on the timer will raise Stopped.
val active : t -> boolReturn true until stop t has been called.