We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
window.performance.now
1 parent 1595464 commit 2e4272eCopy full SHA for 2e4272e
CHANGELOG.md
@@ -11,6 +11,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11
### Changed
12
13
- Fixed build issue on x86/x86_64 platforms that did not have SSE.
14
+- Fixed clock off by a factor of 1000 in wasm/web browser
15
16
## [0.10.0] - 2022-05-18
17
src/clocks/monotonic/wasm.rs
@@ -13,7 +13,7 @@ impl Monotonic {
.expect(WASM_MISSING_WINDOW_PERF)
.now();
// `window.performance.now()` returns the time in milliseconds.
- return f64::trunc(now * 1000.0) as u64;
+ return f64::trunc(now * 1_000_000.0) as u64;
}
18
19
0 commit comments