Spaces:
Runtime error
Runtime error
File size: 586 Bytes
b5ea024 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
"use strict";
module.exports = function (t, a, d) {
var called = 0;
var fn = t(function () {
++called;
}, 200);
fn();
a(called, 1);
fn();
fn();
a(called, 1);
// Wait 120ms
setTimeout(function () {
a(called, 1);
fn();
// Wait 120ms
setTimeout(function () {
a(called, 2);
fn();
fn();
// Wait 80ms
setTimeout(function () {
a(called, 2);
// Wait 120ms
setTimeout(function () {
a(called, 3);
// Wait 400ms
setTimeout(function () {
a(called, 3);
d();
}, 400);
}, 120);
}, 80);
}, 120);
}, 120);
};
|