Elide provides the familiar timer globals:
setTimeout/clearTimeoutsetInterval/clearIntervalsetImmediate/clearImmediatequeueMicrotask
Timer functions return Node-compatible Timeout or Immediate objects, not
numeric IDs. The objects support ref(), unref(), and hasRef();
Timeout also supports refresh().
const timer = setTimeout(() => console.log("done"), 100);
timer.unref();At a checkpoint, observed ordering is:
process.nextTick- Promise and
queueMicrotaskcallbacks in enqueue order setImmediate- zero-delay timers
const order = [];
Promise.resolve().then(() => order.push("promise"));
queueMicrotask(() => order.push("microtask"));
setImmediate(() => order.push("immediate"));
setTimeout(() => console.log(order), 0);The callback must be callable. String handlers are not supported.