summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/shell-watchdog.js
blob: 54e85ee01bf6c2cf2747343a40a1651b1790365e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// |jit-test| exitstatus: 6; skip-if: getBuildConfiguration()['wasi']

/* This test will loop infinitely if the shell watchdog
   fails to kick in. */

timeout(0.1);
var start = new Date();

while (true) {
    var end = new Date();
    var duration = (end.getTime() - start.getTime()) / 1000;
    if (duration > 1) {
        print("tick");
        start = new Date();
    }
}