@@ -224,8 +224,8 @@ function TimersList(msecs, unrefed) {
224
224
// adds listOnTimeout to the C++ object prototype, as
225
225
// V8 would not inline it otherwise.
226
226
TimerWrap . prototype [ kOnTimeout ] = function listOnTimeout ( now ) {
227
- var list = this . _list ;
228
- var msecs = list . msecs ;
227
+ const list = this . _list ;
228
+ const msecs = list . msecs ;
229
229
230
230
debug ( 'timeout callback %d' , msecs ) ;
231
231
debug ( 'now: %d' , now ) ;
@@ -322,7 +322,7 @@ function tryOnTimeout(timer, list) {
322
322
function reuse ( item ) {
323
323
L . remove ( item ) ;
324
324
325
- var list = refedLists [ item . _idleTimeout ] ;
325
+ const list = refedLists [ item . _idleTimeout ] ;
326
326
// if empty - reuse the watcher
327
327
if ( list !== undefined && L . isEmpty ( list ) ) {
328
328
debug ( 'reuse hit' ) ;
@@ -346,7 +346,7 @@ function unenroll(item) {
346
346
item . _destroyed = true ;
347
347
}
348
348
349
- var handle = reuse ( item ) ;
349
+ const handle = reuse ( item ) ;
350
350
if ( handle !== null ) {
351
351
debug ( 'unenroll: list empty' ) ;
352
352
handle . close ( ) ;
@@ -429,7 +429,7 @@ exports.setTimeout = setTimeout;
429
429
430
430
431
431
function ontimeout ( timer , start ) {
432
- var args = timer . _timerArgs ;
432
+ const args = timer . _timerArgs ;
433
433
if ( typeof timer . _onTimeout !== 'function' )
434
434
return promiseResolve ( timer . _onTimeout , args [ 0 ] ) ;
435
435
if ( start === undefined && timer . _repeat )
@@ -540,7 +540,7 @@ Timeout.prototype.unref = function() {
540
540
if ( this . _handle ) {
541
541
this . _handle . unref ( ) ;
542
542
} else if ( typeof this . _onTimeout === 'function' ) {
543
- var now = TimerWrap . now ( ) ;
543
+ const now = TimerWrap . now ( ) ;
544
544
if ( ! this . _idleStart ) this . _idleStart = now ;
545
545
var delay = this . _idleStart + this . _idleTimeout - now ;
546
546
if ( delay < 0 ) delay = 0 ;
@@ -551,7 +551,7 @@ Timeout.prototype.unref = function() {
551
551
return ;
552
552
}
553
553
554
- var handle = reuse ( this ) ;
554
+ const handle = reuse ( this ) ;
555
555
if ( handle !== null ) {
556
556
handle . _list = undefined ;
557
557
}
0 commit comments