1
Fork 0

Remove unique and move VerboseTimingGuard fields into a new struct

This commit is contained in:
John Kåre Alsaker 2023-03-21 18:41:45 +01:00
parent f60d2eb6c1
commit 6c57dda44d
4 changed files with 32 additions and 35 deletions

View file

@ -4,10 +4,10 @@ use std::path::{Path, PathBuf};
impl Session {
pub fn timer(&self, what: &'static str) -> VerboseTimingGuard<'_> {
self.prof.unique_verbose_generic_activity(what)
self.prof.verbose_generic_activity(what)
}
pub fn time<R>(&self, what: &'static str, f: impl FnOnce() -> R) -> R {
self.prof.unique_verbose_generic_activity(what).run(f)
self.prof.verbose_generic_activity(what).run(f)
}
}