shell-ahk
Version:
`Lodash`/`jQuery` for `AHK`.
16 lines (10 loc) • 362 B
text/coffeescript
# @ts-check
import $bind from './bind'
import $isNumber from './isNumber'
###* @type import('../type/module').SetTimeout ###
export default (callback, time) ->
callback = $bind callback
unless $isNumber time then throw '$.setTimeout: invalid type'
if time < 1 then time = 1
Native 'SetTimer, % callback, % 0 - time'
return callback