glendix/js/timer

Provides typed JavaScript timer handles backed by Plinth.

Glendix’s established timer handle stays public through identity adapters so callers retain the original platform handle at the JavaScript boundary.

Types

Represents a JavaScript timer handle.

pub type TimerId

Values

pub fn clear_interval(timer timer: TimerId) -> Nil

Cancels a repeating timer.

pub fn clear_timeout(timer timer: TimerId) -> Nil

Cancels a one-shot timer.

pub fn set_interval(
  callback callback: fn() -> Nil,
  every milliseconds: Int,
) -> TimerId

Starts a repeating timer.

pub fn set_timeout(
  callback callback: fn() -> Nil,
  after milliseconds: Int,
) -> TimerId

Starts a one-shot timer.

Search Document