Browse Source

Small clean up to test-timers.js

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
1b42276851
  1. 5
      test/mjsunit/test-timers.js

5
test/mjsunit/test-timers.js

@ -7,12 +7,11 @@ var setTimeout_called = false;
assert.equal(true, setTimeout instanceof Function);
var starttime = new Date;
setTimeout(function () {
var endtime = new Date;
var diff = endtime - starttime;
if (diff < 0) diff = -diff;
assert.ok(diff > 0);
puts("diff: " + diff);
assert.equal(true, 1000 - WINDOW < diff && diff < 1000 + WINDOW);
@ -28,7 +27,7 @@ setInterval(function () {
var endtime = new Date;
var diff = endtime - starttime;
if (diff < 0) diff = -diff;
assert.ok(diff > 0);
puts("diff: " + diff);
var t = interval_count * 1000;

Loading…
Cancel
Save