diff options
author | Peter Hall <peterjoel@gmail.com> | 2019-02-14 12:53:59 +0000 |
---|---|---|
committer | Peter Hall <peterjoel@gmail.com> | 2019-03-20 15:01:26 +0000 |
commit | 8bfd4dc1e2f9c71ff3d1f9964565c43a6ae02278 (patch) | |
tree | 3e59f25c2588711f4185c6fbba16af293d1d3453 /components/script/timers.rs | |
parent | 34fda66dfa5528f2b10a873e9a67417c6986c712 (diff) | |
download | servo-8bfd4dc1e2f9c71ff3d1f9964565c43a6ae02278.tar.gz servo-8bfd4dc1e2f9c71ff3d1f9964565c43a6ae02278.zip |
#8539 Config preferences backend restructure
Diffstat (limited to 'components/script/timers.rs')
-rw-r--r-- | components/script/timers.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/components/script/timers.rs b/components/script/timers.rs index c83fbff9649..45c809394a1 100644 --- a/components/script/timers.rs +++ b/components/script/timers.rs @@ -20,7 +20,7 @@ use js::rust::HandleValue; use script_traits::{precise_time_ms, MsDuration}; use script_traits::{TimerEvent, TimerEventId, TimerEventRequest}; use script_traits::{TimerSchedulerMsg, TimerSource}; -use servo_config::prefs::PREFS; +use servo_config::pref; use std::cell::Cell; use std::cmp::{self, Ord, Ordering}; use std::collections::HashMap; @@ -227,10 +227,7 @@ impl OneshotTimers { } pub fn slow_down(&self) { - let duration = PREFS - .get("js.timers.minimum_duration") - .as_u64() - .unwrap_or(1000); + let duration = pref!(js.timers.minimum_duration) as u64; self.js_timers.set_min_duration(MsDuration::new(duration)); } |