Coffeekraken.io 0.0.1

setRecursiveTimeout

This utils function allows you to call a passed function each x time during a certain duration

Name Type Description Status Default
fn { Function } The function to execute required
timeout { Number } The time between each execution required
duration { Number } The duration of the timeout required
spread { Number } An optional spread time that will be used to randomize the function executions times optional 0

Return { Function } clearer

Example

    setRecursiveTimeout(() => {
        // I will be executed 10 times
}, 1000, 10000);

Author : Olivier Bossel olivier.bossel@gmail.com