Skip to content

Instantly share code, notes, and snippets.

@ivan
Created November 26, 2023 23:15
Show Gist options
  • Save ivan/feef5f0033a9d23e79bda22fe95d994a to your computer and use it in GitHub Desktop.
Save ivan/feef5f0033a9d23e79bda22fe95d994a to your computer and use it in GitHub Desktop.
setTimeout(..., Infinity)
> setTimeout(() => console.log("hi"), Infinity)
Timeout {
_idleTimeout: 1,
_idlePrev: [TimersList],
_idleNext: [TimersList],
_idleStart: 42302,
_onTimeout: [Function (anonymous)],
_timerArgs: undefined,
_repeat: null,
_destroyed: false,
[Symbol(refed)]: true,
[Symbol(kHasPrimitive)]: false,
[Symbol(asyncId)]: 324,
[Symbol(triggerId)]: 6
}
> (node:776874) TimeoutOverflowWarning: Infinity does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(Use `node --trace-warnings ...` to show where the warning was created)
hi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment