mirror of https://gitee.com/openkylin/nodejs.git
17 lines
359 B
JavaScript
17 lines
359 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
|
|
const assert = require('assert');
|
|
const timers = require('timers');
|
|
|
|
const enrollObj = {
|
|
_onTimeout: common.mustCall(),
|
|
};
|
|
|
|
timers.enroll(enrollObj, 1);
|
|
assert.strictEqual(enrollObj._idleTimeout, 1);
|
|
timers.enroll(enrollObj, 10);
|
|
assert.strictEqual(enrollObj._idleTimeout, 10);
|
|
timers.active(enrollObj);
|