Skip to content
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

Update js wasi clocks #118

Merged
merged 2 commits into from
Jul 27, 2023
Merged

Commits on Jul 27, 2023

  1. Use one Date.now() call in wall clock

    This prevents a "bad" case when one first Date.now() call returns a different date than the second Date.now() call, which can be especially bad if the two dates "cross over" the millisecond boundary.
    kajacx committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    8b370cf View commit details
    Browse the repository at this point in the history
  2. Multiply performance.now() by 1e6 instead of 1e9

    performance.now() returns milliseconds, and we want nanoseconds, so we need to multiply by a million, not a billion.
    kajacx committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    2386a60 View commit details
    Browse the repository at this point in the history