Skip to content

Commit 56b3205

Browse files
nikolaykrashnikovtargos
authored andcommitted
src: lib/internal/timers.js var -> let/const
PR-URL: #30314 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 881de0e commit 56b3205

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎lib/internal/timers.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
varlist=timerListMap[msecs];
316+
letlist=timerListMap[msecs];
317317
if(list===undefined){
318318
debug('no %d list was found in insert, creating a new one',msecs);
319319
constexpiry=start+msecs;
@@ -396,7 +396,7 @@ function getTimerCallbacks(runNextTicks) {
396396
functionprocessImmediate(){
397397
constqueue=outstandingQueue.head!==null ?
398398
outstandingQueue : immediateQueue;
399-
varimmediate=queue.head;
399+
letimmediate=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-
vardiff,timer;
486485
letranAtLeastOneTimer=false;
486+
lettimer;
487487
while(timer=L.peek(list)){
488-
diff=now-timer._idleStart;
488+
constdiff=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

Comments
 (0)