aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/timers.rs
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2016-07-02 13:51:17 -0400
committerCorey Farwell <coreyf@rwell.org>2016-07-02 16:43:39 -0400
commit22928f50ace78091bcb434c61e731663dbf3e625 (patch)
treee94536bc35887e3f4a7c9e5dd5f7dc2d271b415f /components/script/timers.rs
parent307844a8c17aedc369388baf4d98b0f82c3b695b (diff)
downloadservo-22928f50ace78091bcb434c61e731663dbf3e625.tar.gz
servo-22928f50ace78091bcb434c61e731663dbf3e625.zip
Refactor `util::prefs` operations to be methods on static struct.
Diffstat (limited to 'components/script/timers.rs')
-rw-r--r--components/script/timers.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/timers.rs b/components/script/timers.rs
index 989382e80fe..237c354be9f 100644
--- a/components/script/timers.rs
+++ b/components/script/timers.rs
@@ -22,7 +22,7 @@ use std::cmp::{self, Ord, Ordering};
use std::collections::HashMap;
use std::default::Default;
use std::rc::Rc;
-use util::prefs::get_pref;
+use util::prefs::PREFS;
#[derive(JSTraceable, PartialEq, Eq, Copy, Clone, HeapSizeOf, Hash, PartialOrd, Ord, Debug)]
pub struct OneshotTimerHandle(i32);
@@ -214,7 +214,7 @@ impl OneshotTimers {
}
pub fn slow_down(&self) {
- let duration = get_pref("js.timers.minimum_duration").as_u64().unwrap_or(1000);
+ let duration = PREFS.get("js.timers.minimum_duration").as_u64().unwrap_or(1000);
self.js_timers.set_min_duration(MsDuration::new(duration));
}