eve.core.windows.timers

Timer support for the Windows event loop.

This module provides performance-counter-based timer helpers used by the Windows event loop. Windows uses QueryPerformanceCounter for high-resolution timing.

struct TimerState

Types 1

Windows performance-counter-based timer state.

Wraps QueryPerformanceCounter/QueryPerformanceFrequency to provide millisecond-precision timing for the event loop timer wheel.

Fields
long _perfFreq
long _startTime
Methods
bool initialize(ref TimerWheel timerWheel) @trusted nothrowInitialize the timer state by calibrating the performance counter.
long currentTimeMs() @trusted nothrow @nogcGet the current time in milliseconds since initialization.
int computePollTimeout(Slot)(int requestedTimeoutMs, const ref TimerWheel timerWheel, scope const(Slot)[] slots) const pure @safe nothrow @nogcCompute the poll timeout considering timer deadlines and idle watchers.
long perfFreq() const pure @safe nothrow @nogc