mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
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 -->
This commit is contained in:
commit
a58f71c38e
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