hs.timer.delayed
, the delay will not be extended with subsequent run()
calls, but the delay will trigger again if run()
is called again later.cp.deferred.new(delay) -> cp.deferred
defer
instance, which will trigger any added action
s by a set delay afterrun()
is initally called.cp.deferred
instance.cp.deferred:action(actionFn) -> self
action
the the list that will be called when the timer goes off.cp.deferred:delay([value]) -> self | number
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Sets/gets the delay period. If no value
is provided, the current delay is returned. | | Parameters |cp.deferred
instance if a new value is provided, or the current delay if not.cp.deferred:run() -> self
delay
.cp.deferred
instance.cp.deferred:secondsRemaining() -> number | nil
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Returns the number of seconds until the next execution, or nil
if it's not running. | | Parameters |cp.deferred:stop() -> self
cp.deferred:waiting() -> boolean
true
if the deferred action is waiting to execute.