mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #6292 - Wafflespeanut:timestamp, r=jdm
Changed the operator and updated the wpt-test for `hr-time`. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6292) <!-- Reviewable:end -->
This commit is contained in:
commit
458a532461
4 changed files with 23 additions and 1 deletions
|
@ -51,7 +51,7 @@ impl<'a> PerformanceMethods for JSRef<'a, Performance> {
|
|||
// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HighResolutionTime/Overview.html#dom-performance-now
|
||||
fn Now(self) -> DOMHighResTimeStamp {
|
||||
let navStart = self.timing.root().r().NavigationStartPrecise();
|
||||
let now = (time::precise_time_ns() as f64 - navStart) * 1000000 as f64;
|
||||
let now = (time::precise_time_ns() as f64 - navStart) / 1000000 as f64;
|
||||
Finite::wrap(now)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue