EventLoop.registerTimer

Token registerTimer(long delayMs, long intervalMs, WatcherCallback callback) @trusted nothrow

Register a one-shot timer watcher.

Timers use the TimerWheel for O(1) scheduling. Timer precision depends on the event loop's poll interval. Timers fire during the timer dispatch phase of each loop iteration, so actual resolution is bounded by the duration of I/O processing in the same iteration. Unlike Linux timerfd, there is no kernel-level timer delivery — the loop advances the wheel based on QueryPerformanceCounter monotonic time.

Parameters

delayMsDelay before the timer fires, in milliseconds.
callbackCallback invoked when the timer expires.

Returns

New watcher token on success, or Token.invalid with errno set.