Skip to content

Commit

Permalink
3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
odoldotol committed Nov 10, 2024
1 parent 42f8fba commit 454a9c3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions 03-callbacks-and-events/ticker.fix.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ function ticker(
let tick_count = 0;

let ticker50 = () => {
setTimeout(() => {
if (ticker50 !== null) {
if (ticker50 !== null) {
process.nextTick(() => {
emitter.emit('tick');
tick_count++;
ticker50();
}
}, 50);
});
setTimeout(ticker50, 50);
}
};

setTimeout(() => {
Expand Down

0 comments on commit 454a9c3

Please # to comment.