Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / windowAdvance

Function: windowAdvance()

ts
function windowAdvance(state, nowSlot): SlidingWindowState;

Defined in: packages/core/src/admission/algorithms.ts:93

Rotates the ring so nowSlot is the head; expired slots zero out.

Parameters

ParameterType
stateSlidingWindowState
nowSlotnumber

Returns

SlidingWindowState