@@ -313,7 +313,7 @@ function insert(item, refed, start) {
313313 item . _idleStart = start ;
314314
315315 // 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 ] ;
317317 if ( list === undefined ) {
318318 debug ( 'no %d list was found in insert, creating a new one' , msecs ) ;
319319 const expiry = start + msecs ;
@@ -396,7 +396,7 @@ function getTimerCallbacks(runNextTicks) {
396396 function processImmediate ( ) {
397397 const queue = outstandingQueue . head !== null ?
398398 outstandingQueue : immediateQueue ;
399- var immediate = queue . head ;
399+ let immediate = queue . head ;
400400
401401 // Clear the linked list early in case new `setImmediate()`
402402 // calls occur while immediate callbacks are executed
@@ -482,10 +482,10 @@ function getTimerCallbacks(runNextTicks) {
482482
483483 debug ( 'timeout callback %d' , msecs ) ;
484484
485- var diff , timer ;
486485 let ranAtLeastOneTimer = false ;
486+ let timer ;
487487 while ( timer = L . peek ( list ) ) {
488- diff = now - timer . _idleStart ;
488+ const diff = now - timer . _idleStart ;
489489
490490 // Check if this loop iteration is too early for the next timer.
491491 // This happens if there are more timers scheduled for later in the list.
0 commit comments