function flushIntervalHandlers()

in src/helper/timeline.ts [150:166]


function flushIntervalHandlers() {
    // Copy the array. In case setInterval/clearInterval is invoked in the callback.
    const savedIntervalHandlers = intervalHandlers.slice();
    for (let i = 0; i < savedIntervalHandlers.length; i++) {
        const handler = savedIntervalHandlers[i];
        if (handler.frame === frameIdx) {
            try {
                handler.callback();
            }
            catch (e) {
                // Catch error to avoid following tasks.
                // __VRT_LOG_ERRORS__(e.toString());
            }
            handler.frame += handler.intervalFrame;
        }
    }
}