blob: 357ac88cbca18c6902757814529fac16ac79d9c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
var common = require('../common');
var assert = require('assert');
var TIMEOUT = 50;
var last = process.hrtime();
setTimeout(function() {
var hr = process.hrtime(last);
var ms = (hr[0] * 1e3) + (hr[1] / 1e6);
var delta = ms - TIMEOUT;
console.log('timer fired in', delta);
assert.ok(delta > 0, 'Timer fired early');
}, TIMEOUT);
|