blob: 8d2d88b74f736fa37dc4f7268be3603508cdb35d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
'use strict';
require('../common');
var assert = require('assert');
console.error(process.uptime());
assert.ok(process.uptime() <= 2);
var original = process.uptime();
setTimeout(function() {
var uptime = process.uptime();
// some wiggle room to account for timer
// granularity, processor speed, and scheduling
assert.ok(uptime >= original + 2);
assert.ok(uptime <= original + 3);
}, 2000);
|