Idris2Doc : System.UV.Raw.Timer

System.UV.Raw.Timer

(source)
This module provides the raw primitive bindings to the
timer API from libuv.

No additional security measures are implemented. For a nicer but
more restrictive API, see module `System.UV.Timer`.

Definitions

uv_timer_init : HasIOio=>PtrLoop->PtrTimer->ioInt32
  Initialize the handle.

Totality: total
Visibility: export
uv_timer_start : HasIOio=>PtrTimer-> (PtrTimer->IO ()) ->Bits64->Bits64->ioInt32
  Start the timer. timeout and repeat are in milliseconds.

If timeout is zero, the callback fires on the next
event loop iteration. If repeat is non-zero, the callback fires
first after timeout milliseconds and then repeatedly after repeat
milliseconds.

Totality: total
Visibility: export
uv_timer_stop : HasIOio=>PtrTimer->ioInt32
  Stop the timer, the callback will not be called anymore.

Totality: total
Visibility: export
uv_timer_again : HasIOio=>PtrTimer->ioInt32
  Stop the timer, and if it is repeating restart it using
the repeat value as the timeout. If the timer has
never been started before it returns UV_EINVAL.

Totality: total
Visibility: export
uv_timer_set_repeat : HasIOio=>PtrTimer->Bits64->io ()
  Set the repeat interval value in milliseconds. The timer
will be scheduled to run on the given interval, regardless
of the callback execution duration, and will follow normal
timer semantics in the case of a time-slice overrun.

For example, if a 50ms repeating timer first runs for 17ms,
it will be scheduled to run again 33ms later. If other tasks
consume more than the 33ms following the first timer callback,
then the callback will run as soon as possible.

NOTE:
If the repeat value is set from a timer callback it does
not immediately take effect. If the timer was non-repeating
before, it will have been stopped. If it was repeating, then the
old repeat value will have been used to schedule the next timeout.

Totality: total
Visibility: export
uv_timer_get_repeat : HasIOio=>PtrTimer->ioBits64
  Get the timer repeat value.

Totality: total
Visibility: export
uv_timer_get_due_in : HasIOio=>PtrTimer->ioBits64
  Get the timer due value or 0 if it has expired. The time is relative to
uv_now.

Totality: total
Visibility: export