package luv

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Luv.TimerSource

Timers.

See Hello, world! in the user guide and uv_timer_t — Timer handle in libuv.

Sourcetype t = [ `Timer ] Handle.t

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.

Sourceval init : ?loop:Loop.t -> unit -> (t, Error.t) Result.result

Allocates and initializes a timer.

Binds uv_timer_init.

Sourceval start : ?call_update_time:bool -> ?repeat:int -> t -> int -> (unit -> unit) -> (unit, Error.t) Result.result

Starts a timer.

Binds uv_timer_start.

Sourceval stop : t -> (unit, Error.t) Result.result

Stops a timer.

Binds uv_timer_stop.

Sourceval again : t -> (unit, Error.t) Result.result

Restarts a timer.

Binds uv_timer_again.

Sourceval set_repeat : t -> int -> unit

Sets the timer repeat interval.

Binds uv_timer_set_repeat.

Sourceval get_repeat : t -> int

Retrieves the timer repeat interval.

Binds uv_timer_get_repeat.

OCaml

Innovation. Community. Security.