]> git.proxmox.com Git - ceph.git/blob - ceph/src/civetweb/src/third_party/duktape-1.3.0/examples/eventloop/basic-test.js
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / civetweb / src / third_party / duktape-1.3.0 / examples / eventloop / basic-test.js
1 /*
2 * A few basic tests
3 */
4
5 var count = 0;
6 var intervalId;
7
8 setTimeout(function (x) { print('timer 1', x); }, 1234, 'foo');
9 setTimeout('print("timer 2");', 4321);
10 setTimeout(function () { print('timer 3'); }, 2345);
11 intervalId = setInterval(function (x, y) {
12 print('interval', ++count, x, y);
13 if (count >= 10) {
14 clearInterval(intervalId);
15 }
16 }, 400, 'foo', 'bar');
17