Skip to content

Commit

Permalink
Issue #7501 emove unused time function in time module of profile
Browse files Browse the repository at this point in the history
  • Loading branch information
leaexplores committed Sep 2, 2015
1 parent e46499a commit ba1109b
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions components/profile/time.rs
Expand Up @@ -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;
}

0 comments on commit ba1109b

Please sign in to comment.