We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#262 Adds wasm support. But the duration obtained through web-sys is currently wrong. It uses Performance.now (https://developer.mozilla.org/en-US/docs/Web/API/Performance/now) which returns the milliseconds since the page/worker has loaded.
See the current implementation in https://github.com/nyx-space/hifitime/pull/262/files#diff-2effce6c18e7a6bda6cd5148cecf1af4951be035c6c03b6665e0275539c7f5eeR8-R12
Instead we should use something like https://lib.rs/crates/web-time, or adopt it's implementation for this use-case
This implementation uses Performance.now() for Instant and Date.now() for SystemTime to offer a drop-in replacement that works in browsers
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
#262 Adds wasm support. But the duration obtained through web-sys is currently wrong.
It uses Performance.now (https://developer.mozilla.org/en-US/docs/Web/API/Performance/now) which returns the milliseconds since the page/worker has loaded.
See the current implementation in https://github.com/nyx-space/hifitime/pull/262/files#diff-2effce6c18e7a6bda6cd5148cecf1af4951be035c6c03b6665e0275539c7f5eeR8-R12
Instead we should use something like https://lib.rs/crates/web-time, or adopt it's implementation for this use-case
The text was updated successfully, but these errors were encountered: