Skip to content

when tracking threads, use a monotonic clock that ignores system suspension #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matthew-nicholson-anrok
Copy link

@matthew-nicholson-anrok matthew-nicholson-anrok commented Jul 25, 2025

Using the system time causes each suspension to be detected as an event loop delay which is not useful. System suspensions may be common when running in low cost cloud environments where systems are suspended when not actively serving requests.

Closes #13

Testing

I am only able to test on macos currently, but the code seems to work as expected there.

  • suspend machine with eventLoopBlockIntegration enabled, ensure no event is triggered when resuming
    • test on linux
    • test on macos
    • test on windows
  • run function to delay event loop, ensure event is triggered
    • test on linux
    • test on macos
    • test on windows

…ension

Using the system time causes each suspension to be detected as an event
loop delay which is not useful. System suspensions may be common when
running in low cost cloud environments where systems are suspended when
not actively serving requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

system suspension is detected as a blocked event loop
1 participant