summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/requestidlecallback/resources/ric-utils.js
blob: d6d22767a98eee1862fd06bd89d9dc03debb3a29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function getDeadlineForNextIdleCallback() {
    return new Promise(
        resolve =>
            requestIdleCallback(deadline => resolve(deadline.timeRemaining()))
    );
}

function getPendingRenderDeadlineCap() {
    return 1000 / 60;
}

function getRICRetryCount() {
    return 10;
}