Remove unique
and move VerboseTimingGuard
fields into a new struct
This commit is contained in:
parent
f60d2eb6c1
commit
6c57dda44d
4 changed files with 32 additions and 35 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue