mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Issue #7501 emove unused time function in time module of profile
This commit is contained in:
parent
e46499a5df
commit
ba1109b920
1 changed files with 0 additions and 13 deletions
|
@ -209,16 +209,3 @@ impl Profiler {
|
|||
println!("");
|
||||
}
|
||||
}
|
||||
|
||||
pub fn time<T, F>(msg: &str, callback: F) -> T
|
||||
where F: Fn() -> T
|
||||
{
|
||||
let start_time = precise_time_ns();
|
||||
let val = callback();
|
||||
let end_time = precise_time_ns();
|
||||
let ms = (end_time - start_time) as f64 / 1000000f64;
|
||||
if ms >= 5f64 {
|
||||
debug!("{} took {} ms", msg, ms);
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue