Luv.TimerSourceTimers.
See Hello, world! in the user guide and uv_timer_t — Timer handle in libuv.
Binds uv_timer_t.
Note that values of this type can be passed to functions in Luv.Handle, in addition to the functions in this module. In particular, see Luv.Handle.close.
Allocates and initializes a timer.
Binds uv_timer_init.
val start :
?call_update_time:bool ->
?repeat:int ->
t ->
int ->
(unit -> unit) ->
(unit, Error.t) resultStarts a timer.
Binds uv_timer_start.
As of Luv 0.5.7 and libuv 1.41.0 (March 2021), this function can fail only if the timer handle is currently closing, i.e.
Luv.Handle.is_closing timer = trueStops a timer.
Binds uv_timer_stop.
Restarts a timer.
Binds uv_timer_again.
Sets the timer repeat interval.
Binds uv_timer_set_repeat.
Retrieves the timer repeat interval.
Binds uv_timer_get_repeat.
Evaluates to the time until the timer expires, or zero if it has already expired.
Binds uv_timer_get_due_in.
Requires Luv 0.5.6 and libuv 1.40.0.
Feature check: Luv.Require.(has timer_get_due_in)