From 188b0f96f98feaa0771f941343887c46113c8ced Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 22 May 2021 16:53:47 +0300 Subject: Add more docs --- crates/profile/src/stop_watch.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/profile/src/stop_watch.rs') diff --git a/crates/profile/src/stop_watch.rs b/crates/profile/src/stop_watch.rs index cb6915d45..112d03a9c 100644 --- a/crates/profile/src/stop_watch.rs +++ b/crates/profile/src/stop_watch.rs @@ -44,7 +44,7 @@ impl StopWatch { } pub fn memory(mut self, yes: bool) -> StopWatch { if yes { - self.memory = Some(MemoryUsage::current()); + self.memory = Some(MemoryUsage::now()); } self } @@ -58,7 +58,7 @@ impl StopWatch { #[cfg(not(target_os = "linux"))] let instructions = None; - let memory = self.memory.map(|it| MemoryUsage::current() - it); + let memory = self.memory.map(|it| MemoryUsage::now() - it); StopWatchSpan { time, instructions, memory } } } -- cgit v1.2.3