Crate deno_timers[][src]

Expand description

This module helps deno implement timers.

As an optimization, we want to avoid an expensive calls into rust for every setTimeout in JavaScript. Thus in //js/timers.ts a data structure is implemented that calls into Rust for only the smallest timeout. Thus we only need to be able to start, cancel and await a single timer (or Delay, as Tokio calls it) for an entire Isolate. This is what is implemented here.

Structs

GlobalTimer
NoTimersPermission

Traits

TimersPermission

Functions

init
op_global_timer
op_global_timer_start
op_global_timer_stop
op_now
op_sleep_sync

Type Definitions

StartTime