File HoldDown.lua
Functions
GwHoldDown:clear () | Clear the hold-down timer. |
GwHoldDown:hold () | Test the hold-down status. |
GwHoldDown:new (interval) | GwHoldDown constructor function. |
GwHoldDown:set () | Set the start of the hold-down interval. |
GwHoldDownCache:hold (s) | Test the hold-down status of an element. |
GwHoldDownCache:new (interval, soft_max, hard_max) | GwHoldDownCache constructor function. |
Functions
- GwHoldDown:clear ()
-
Clear the hold-down timer.
Return value:
- The time at which the interval will end.
- GwHoldDown:hold ()
-
Test the hold-down status.
Return value:
- True if a hold-down is in effect, false otherwise.
- GwHoldDown:new (interval)
-
GwHoldDown constructor function.
Parameters:
-
interval
: The length, in seconds, of the hold-down interval.
Return value:
- An initialized GwHoldDown instance.
-
- GwHoldDown:set ()
-
Set the start of the hold-down interval.
Return value:
- The time at which the interval will end.
- GwHoldDownCache:hold (s)
-
Test the hold-down status of an element.
Parameters:
-
s
:
Return value:
- True if a hold-down is in effect, false otherwise.
-
- GwHoldDownCache:new (interval, soft_max, hard_max)
-
GwHoldDownCache constructor function.
Parameters:
-
interval
: The length, in seconds, of the hold-down interval. -
soft_max
: Table size threshold for compaction. -
hard_max
: Limit on table size.
Return value:
- An initialized GwHoldDownCache instance.
-