HSTimer
Type
Object representing a timer. You should not instantiate these yourself, but rather, use the methods in hs.timer to create them for you.
Properties
Methods
start()
Start the timer
Hammerspoon 2/Modules/hs.timer/HSTimer.swift:20
Parameters
None
Returns
Nothing
stop()
Stop the timer
Hammerspoon 2/Modules/hs.timer/HSTimer.swift:23
Parameters
None
Returns
Nothing
fire()
Immediately fire the timer's callback
Hammerspoon 2/Modules/hs.timer/HSTimer.swift:26
Parameters
None
Returns
Nothing
running()
Check if the timer is currently running
Hammerspoon 2/Modules/hs.timer/HSTimer.swift:30
Parameters
None
Returns
boolean - true if the timer is running, false otherwise
nextTrigger()
Get the number of seconds until the timer next fires
Hammerspoon 2/Modules/hs.timer/HSTimer.swift:34
Parameters
None
Returns
number - Seconds until next trigger, or a negative value if the timer is not running
setNextTrigger(seconds)
Set when the timer should next fire
Hammerspoon 2/Modules/hs.timer/HSTimer.swift:38
Parameters
-
secondsnumberNumber of seconds from now when the timer should fire
Returns
Nothing