Skip to content

Expose arbitrary constants like TIMEOUT_MAX #11198

@scottinet

Description

@scottinet
  • Version: all
  • Platform: all
  • Subsystem: all

Hi!

Nothing urgent nor critical, but I came across the setTimeout delay limitation to 2^31-1, named TIMEOUT_MAX in timers.js
If I want to handle delays provided by clients potentially larger than that, I have to test it against what appears to be an arbitrary limitation. I have no problem with that. What bothers me is that I have no way to check if this limitation has changed when upgrading nodejs' version, except by hand, and only if I recall that I used it. I'm not really at ease with this. :-)
What would be handy in such cases is to expose this constant (and potentially others?), a bit like what's done in C with limits.h, so that we can use them without wondering if these are subject to future changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues that look for answers.timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions