#hs.timer.delayed
Specialized timer objects to coalesce processing of unpredictable asynchronous events into a single callback
#API Overview
Constructors - API calls which return an object, typically one that offers API methods
Methods - API calls which can only be made on an object returned by a constructor
#API Documentation
#Constructors
Signature | hs.timer.delayed.new(delay, fn) -> hs.timer.delayed object |
Type | Constructor |
Description | Creates a new delayed timer |
Parameters |
|
Returns |
|
Notes |
|
Examples | None |
Source | extensions/timer/timer.lua line 328 |
#Methods
Signature | hs.timer.delayed:nextTrigger() -> number or nil |
Type | Method |
Description | Returns the time left in the callback countdown |
Parameters |
|
Returns |
|
Notes | None |
Examples | None |
Source | extensions/timer/timer.lua line 318 |
Signature | hs.timer.delayed:running() -> boolean |
Type | Method |
Description | Returns a boolean indicating whether the callback countdown is running |
Parameters |
|
Returns |
|
Notes | None |
Examples | None |
Source | extensions/timer/timer.lua line 295 |
Signature | hs.timer.delayed:setDelay(delay) -> hs.timer.delayed object |
Type | Method |
Description | Changes the callback countdown duration |
Parameters |
|
Returns |
|
Notes |
|
Examples | None |
Source | extensions/timer/timer.lua line 305 |
Signature | hs.timer.delayed:start([delay]) -> hs.timer.delayed object |
Type | Method |
Description | Starts or restarts the callback countdown |
Parameters |
|
Returns |
|
Notes | None |
Examples | None |
Source | extensions/timer/timer.lua line 275 |
Signature | hs.timer.delayed:stop() -> hs.timer.delayed object |
Type | Method |
Description | Cancels the callback countdown, if running; the callback will therefore not be triggered |
Parameters |
|
Returns |
|
Notes | None |
Examples | None |
Source | extensions/timer/timer.lua line 285 |