diff --git a/components/metrics/lib.rs b/components/metrics/lib.rs index 4f42c2f7bbe..ea1b182b457 100644 --- a/components/metrics/lib.rs +++ b/components/metrics/lib.rs @@ -18,7 +18,7 @@ use servo_url::ServoUrl; /// TODO make this configurable /// maximum task time is 50ms (in ns) -pub const MAX_TASK_NS: u64 = 50000000; +pub const MAX_TASK_NS: u128 = 50000000; /// 10 second window const INTERACTIVE_WINDOW_SECONDS: Duration = Duration::from_secs(10); diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 2e934217815..0d216212257 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -1726,7 +1726,7 @@ impl ScriptThread { let task_duration = start.elapsed(); for (doc_id, doc) in self.documents.borrow().iter() { if let Some(pipeline_id) = pipeline_id { - if pipeline_id == doc_id && task_duration.as_nanos() > MAX_TASK_NS.into() { + if pipeline_id == doc_id && task_duration.as_nanos() > MAX_TASK_NS { if self.print_pwm { println!( "Task took longer than max allowed ({:?}) {:?}",