diff options
author | Aleksey Kladov <[email protected]> | 2021-05-22 14:53:47 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-05-22 14:53:47 +0100 |
commit | 188b0f96f98feaa0771f941343887c46113c8ced (patch) | |
tree | 870d3afb3479ea9f0c323d7c539ce615ec4a4651 /crates/profile/src/stop_watch.rs | |
parent | e6776c3e1b66c8946873d20e1e3bc1d743c952fe (diff) |
Add more docs
Diffstat (limited to 'crates/profile/src/stop_watch.rs')
-rw-r--r-- | crates/profile/src/stop_watch.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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 { | |||
44 | } | 44 | } |
45 | pub fn memory(mut self, yes: bool) -> StopWatch { | 45 | pub fn memory(mut self, yes: bool) -> StopWatch { |
46 | if yes { | 46 | if yes { |
47 | self.memory = Some(MemoryUsage::current()); | 47 | self.memory = Some(MemoryUsage::now()); |
48 | } | 48 | } |
49 | self | 49 | self |
50 | } | 50 | } |
@@ -58,7 +58,7 @@ impl StopWatch { | |||
58 | #[cfg(not(target_os = "linux"))] | 58 | #[cfg(not(target_os = "linux"))] |
59 | let instructions = None; | 59 | let instructions = None; |
60 | 60 | ||
61 | let memory = self.memory.map(|it| MemoryUsage::current() - it); | 61 | let memory = self.memory.map(|it| MemoryUsage::now() - it); |
62 | StopWatchSpan { time, instructions, memory } | 62 | StopWatchSpan { time, instructions, memory } |
63 | } | 63 | } |
64 | } | 64 | } |