Edit this page

up.util up.util.timer(millis, callback)
JavaScript function

Waits for the given number of milliseconds, the runs the given callback.

Instead of up.util.timer(0, fn) you can also use up.util.task(fn).


Parameters

millis number
callback Function()

Return value

number

The ID of the scheduled timeout.

You may pass this ID to clearTimeout() to un-schedule the timeout.