Class EventRollingTimeCounter

Class that tracks how long it has taken the last N events to occur

Constructors

Accessors

Methods

  • Check if the time between the last N events is less than the provided threshold

    Parameters

    • minRollingTimeMs: number

      Minimum time that must have passed when the last N events occurred

    Returns boolean

    • True if the threshold is violated, false otherwise