aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/profile/time.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/components/profile/time.rs b/components/profile/time.rs
index f1c8527366c..302003ecbb8 100644
--- a/components/profile/time.rs
+++ b/components/profile/time.rs
@@ -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;
-}