diff options
Diffstat (limited to 'components/util/time.rs')
-rw-r--r-- | components/util/time.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/util/time.rs b/components/util/time.rs index cb283ba3e2f..d3e9b5df65d 100644 --- a/components/util/time.rs +++ b/components/util/time.rs @@ -10,6 +10,7 @@ use std::comm::{Sender, channel, Receiver}; use std::f64; use std::iter::AdditiveIterator; use std::io::timer::sleep; +use std::time::duration::Duration; use task::{spawn_named}; use url::Url; @@ -127,7 +128,7 @@ impl TimeProfiler { let (chan, port) = channel(); match period { Some(period) => { - let period = (period * 1000f64) as u64; + let period = Duration::milliseconds((period * 1000f64) as i64); let chan = chan.clone(); spawn_named("Time profiler timer", proc() { loop { @@ -209,7 +210,7 @@ impl TimeProfiler { "_category_", "_incremental?_", "_iframe?_", " _url_", " _mean (ms)_", " _median (ms)_", " _min (ms)_", " _max (ms)_", " _events_"); - for (&(ref category, ref meta), ref mut data) in self.buckets.mut_iter() { + for (&(ref category, ref meta), ref mut data) in self.buckets.iter_mut() { data.sort_by(|a, b| { if a < b { Less |