timers: reposition getTimers definition internally
Just cleanup so the file makes more future sense. PR-URL: https://github.com/nodejs/node/pull/18065 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
This commit is contained in:
parent
a5a811811d
commit
54fe0a6cbb
@ -29,6 +29,14 @@ module.exports = {
|
||||
validateTimerDuration
|
||||
};
|
||||
|
||||
var timers;
|
||||
function getTimers() {
|
||||
if (timers === undefined) {
|
||||
timers = require('timers');
|
||||
}
|
||||
return timers;
|
||||
}
|
||||
|
||||
// Timer constructor function.
|
||||
// The entire prototype is defined in lib/timers.js
|
||||
function Timeout(callback, after, args, isRepeat) {
|
||||
@ -66,13 +74,6 @@ function Timeout(callback, after, args, isRepeat) {
|
||||
}
|
||||
}
|
||||
|
||||
var timers;
|
||||
function getTimers() {
|
||||
if (timers === undefined) {
|
||||
timers = require('timers');
|
||||
}
|
||||
return timers;
|
||||
}
|
||||
|
||||
function setUnrefTimeout(callback, after, arg1, arg2, arg3) {
|
||||
// Type checking identical to setTimeout()
|
||||
|
Loading…
x
Reference in New Issue
Block a user