benchmarks/dbmon/lib/monitor.js
function scheduleTask(task) {
        frameTasks.push(task);
        if (rafId === -1) {
            requestAnimationFrame(function (t) {
                rafId = -1;
                var tasks = frameTasks;
                frameTasks = [];
                for (var i = 0; i < tasks.length; i++) {
                    tasks[i]();
                }
            });
        }
    }
function scheduleTask(task) {
        frameTasks.push(task);
        if (rafId === -1) {
            requestAnimationFrame(function (t) {
                rafId = -1;
                var tasks = frameTasks;
                frameTasks = [];
                for (var i = 0; i < tasks.length; i++) {
                    tasks[i]();
                }
            });
        }
    }
function scheduleTask ( task ) { frameTasks . push ( task ) ; if ( rafId === - 1 ) { requestAnimationFrame ( function ( t ) { rafId = - 1 ; var tasks = frameTasks ; frameTasks = [ ] ; for ( var i = 0 ; i < tasks . length ; i ++ ) { tasks [ i ] ( ) ; } } ) ; } }
Schedule new task that will be executed on the next frame
Schedule new task that will be executed on the next frame