Module Util_lwt_seaboar.Timer
type 'a t =
| Timer of {
clock : unit Lwt.t Stdlib.ref;
cancel : bool Stdlib.ref;
force_finish : bool Stdlib.ref;
timer_handler_data : 'a;
elapsed : int Stdlib.ref;
remaining : int Stdlib.ref;
}
val mk' : ?elapsed:int -> (expired:bool -> 'a -> unit) -> 'a -> int -> 'a t
val mk :
?elapsed:int ->
(expired:bool -> 'a -> unit) ->
'a ->
int ->
('a t, [> `Msg of string ]) Stdlib.result
val cancel : 'a t -> unit
val force_finish : 'a t -> unit
val encode : ('a -> SE.value) -> 'a t -> SE.value
val decode :
(expired:bool -> 'a -> unit) ->
'a Seaboar__.Decode.t ->
'a t Seaboar__.Decode.t