Specialized timer objects to coalesce processing of unpredictable asynchronous events into a single callback
Signature | hs.timer.delayed.new(delay, fn) -> hs.timer.delayed object |
---|---|
Type | Constructor |
Description | Creates a new delayed timer |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/timer/timer.lua line 328 |
Signature | hs.timer.delayed:nextTrigger() -> number or nil |
---|---|
Type | Method |
Description | Returns the time left in the callback countdown |
Parameters |
|
Returns |
|
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 |
|
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 |
|
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 |
|
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 |
|
Source | extensions/timer/timer.lua line 285 |