@@ -313,7 +313,7 @@ function insert(item, refed, start) {
313
313
item . _idleStart = start ;
314
314
315
315
// Use an existing list if there is one, otherwise we need to make a new one.
316
- var list = timerListMap [ msecs ] ;
316
+ let list = timerListMap [ msecs ] ;
317
317
if ( list === undefined ) {
318
318
debug ( 'no %d list was found in insert, creating a new one' , msecs ) ;
319
319
const expiry = start + msecs ;
@@ -396,7 +396,7 @@ function getTimerCallbacks(runNextTicks) {
396
396
function processImmediate ( ) {
397
397
const queue = outstandingQueue . head !== null ?
398
398
outstandingQueue : immediateQueue ;
399
- var immediate = queue . head ;
399
+ let immediate = queue . head ;
400
400
401
401
// Clear the linked list early in case new `setImmediate()`
402
402
// calls occur while immediate callbacks are executed
@@ -482,10 +482,10 @@ function getTimerCallbacks(runNextTicks) {
482
482
483
483
debug ( 'timeout callback %d' , msecs ) ;
484
484
485
- var diff , timer ;
486
485
let ranAtLeastOneTimer = false ;
486
+ let timer ;
487
487
while ( timer = L . peek ( list ) ) {
488
- diff = now - timer . _idleStart ;
488
+ const diff = now - timer . _idleStart ;
489
489
490
490
// Check if this loop iteration is too early for the next timer.
491
491
// This happens if there are more timers scheduled for later in the list.
0 commit comments