diff options
author | ddh <dianehosfelt@gmail.com> | 2017-10-31 23:37:00 +0000 |
---|---|---|
committer | ddh <dianehosfelt@gmail.com> | 2017-11-01 20:45:22 +0000 |
commit | 0a09ee5cd863aebcffa648398ca7c1b027d44ae0 (patch) | |
tree | eaa378dd7dbe8a4f7c2a63f692ddd6f9f9dc22be /components/script/dom/performance.rs | |
parent | b23131abf1528ab47602881fe5dbcbdc16f2b76a (diff) | |
download | servo-0a09ee5cd863aebcffa648398ca7c1b027d44ae0.tar.gz servo-0a09ee5cd863aebcffa648398ca7c1b027d44ae0.zip |
changed f64 to u64 for navigation start timing until it had to be float
Diffstat (limited to 'components/script/dom/performance.rs')
-rw-r--r-- | components/script/dom/performance.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/performance.rs b/components/script/dom/performance.rs index f491fbb7654..5e1f7e6fb92 100644 --- a/components/script/dom/performance.rs +++ b/components/script/dom/performance.rs @@ -114,13 +114,13 @@ pub struct Performance { entries: DomRefCell<PerformanceEntryList>, observers: DomRefCell<Vec<PerformanceObserver>>, pending_notification_observers_task: Cell<bool>, - navigation_start_precise: f64, + navigation_start_precise: u64, } impl Performance { fn new_inherited(global: &GlobalScope, navigation_start: u64, - navigation_start_precise: f64) -> Performance { + navigation_start_precise: u64) -> Performance { Performance { reflector_: Reflector::new(), timing: if global.is::<Window>() { @@ -139,7 +139,7 @@ impl Performance { pub fn new(global: &GlobalScope, navigation_start: u64, - navigation_start_precise: f64) -> DomRoot<Performance> { + navigation_start_precise: u64) -> DomRoot<Performance> { reflect_dom_object( Box::new(Performance::new_inherited(global, navigation_start, navigation_start_precise)), global, @@ -260,7 +260,7 @@ impl Performance { Some(ref timing) => timing.navigation_start_precise(), None => self.navigation_start_precise, }; - (time::precise_time_ns() as f64 - nav_start) / 1000000 as f64 + (time::precise_time_ns() - nav_start) as f64 / 1000000. } } |