Namespace: Timers:reschedule

Timers:reschedule

Source:

Methods

reschedule(timer, ms, callback) → {Object}

Alias for schedule() with more natural param-order for rescheduling.

Parameters:
Name Type Description
timer Object | Number

the timer to refresh/reset

ms Number

time in milliseconds until execution

callback function

callback function to execute after ms

Source:
See:
Throws:

error if ms is not positive or if callback is not a function

Returns:
timer (may be the original timer, if given timer is precise from pschedule or ploop)
Type
Object
Example
const timer = reschedule(timer, 3000, function(){ alert('taking even more time'); });