mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix float conversion of paint timing metrics
This commit is contained in:
parent
462409ada5
commit
4d8660c918
3 changed files with 15 additions and 4 deletions
|
@ -20,6 +20,7 @@ use dom::performanceobserver::PerformanceObserver as DOMPerformanceObserver;
|
|||
use dom::performancetiming::PerformanceTiming;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use metrics::ToMs;
|
||||
use std::cell::Cell;
|
||||
use std::cmp::Ordering;
|
||||
use time;
|
||||
|
@ -260,7 +261,7 @@ impl Performance {
|
|||
Some(ref timing) => timing.navigation_start_precise(),
|
||||
None => self.navigation_start_precise,
|
||||
};
|
||||
(time::precise_time_ns() - nav_start) as f64 / 1000000.
|
||||
(time::precise_time_ns() - nav_start).to_ms()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue