aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-09-01 19:57:42 -0600
committerbors-servo <metajack+bors@gmail.com>2015-09-01 19:57:42 -0600
commita58f71c38eb64a723cfa6f69c75c03e0d46c805e (patch)
tree9c6ccf083dc62f2aacad46d0259efaf0665d1af6
parente46499a5dfd9189fc439c228d9a5fe23dfec0d7d (diff)
parentba1109b920d1a31b03872800fb9e335adcf70eca (diff)
downloadservo-a58f71c38eb64a723cfa6f69c75c03e0d46c805e.tar.gz
servo-a58f71c38eb64a723cfa6f69c75c03e0d46c805e.zip
Auto merge of #7504 - ddrmanxbxfr:RemoveUnusedTimeFunction, r=jdm
Issue #7501 emove unused time function in time module of profile Title sums it up. Time function in the time module of profile crate was unused. Unless we plan to use it soon, we should clean it up See issue #7501 related to it. Thanks. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7504) <!-- Reviewable:end -->
-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;
-}