1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-27 09:39:08 -05:00
denoland-deno/cli/ops
snek 73fbd61bd0
fix: performance.timeOrigin (#26787)
`performance.timeOrigin` was being set from when JS started executing,
but `op_now` measures from an `std::time::Instant` stored in `OpState`,
which is created at a completely different time. This caused
`performance.timeOrigin` to be very incorrect. This PR corrects the
origin and also cleans up some of the timer code.

Compared to `Date.now()`, `performance`'s time origin is now
consistently within 5us (0.005ms) of system time.


![image](https://github.com/user-attachments/assets/0a7be04a-4f6d-4816-bd25-38a2e6136926)
2024-11-08 23:20:24 +01:00
..
bench.rs fix: performance.timeOrigin (#26787) 2024-11-08 23:20:24 +01:00
jupyter.rs refactor: use concrete error type for remaining ops (#26746) 2024-11-06 16:57:57 -08:00
mod.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
testing.rs refactor: use concrete error type for remaining ops (#26746) 2024-11-06 16:57:57 -08:00