package bogue

  1. Overview
  2. Docs

Delayed actions.

Dependency graph
type t
val add : int -> (unit -> unit) -> t

add delay action will execute action () (in the main thread) after the delay of delay ms.

  • returns

    the Timeout element.

    Warning: don't expect the delay to be exact at the ms. The precision cannot be better than what the framerate imposes, i.e. usually about 16ms.

    Note: it is legal for an action to add a new Timeout.

val cancel : t -> unit

Cancel the Timeout.


Innovation. Community. Security.