Skip to content

setInterval setTimeout break for interval > 2^32-1 #19015

Description

@davidhadas
  • Version: v6.11.2
  • Platform: tested on linux and mac
  • Subsystem:
 setInterval(()=>{console.log("a");}, Math.pow(2,31));

same for:
setTimeout(()=>{console.log("a");}, Math.pow(2,31));

Timeout is fired as if it is:
setInterval(()=>{console.log("a");}, 0);
or
setTimeout(()=>{console.log("a");}, 0);

The same issue with any timeout or interval > Math.pow(2,31)-1

Should raise an exception instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues asking questions about Node.js.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions