From 1b68c72fe93424213db895a4066eafb99dfdeac9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 10 Apr 2020 20:46:42 +0200 Subject: Move timeit to stdx --- crates/ra_prof/src/lib.rs | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'crates/ra_prof/src/lib.rs') diff --git a/crates/ra_prof/src/lib.rs b/crates/ra_prof/src/lib.rs index 00ea3a9b0..2d4f68f5e 100644 --- a/crates/ra_prof/src/lib.rs +++ b/crates/ra_prof/src/lib.rs @@ -113,21 +113,6 @@ pub fn profile(label: Label) -> Profiler { }) } -pub fn print_time(label: Label) -> impl Drop { - struct Guard { - label: Label, - start: Instant, - } - - impl Drop for Guard { - fn drop(&mut self) { - eprintln!("{}: {:?}", self.label, self.start.elapsed()) - } - } - - Guard { label, start: Instant::now() } -} - pub struct Profiler { label: Option