MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/splashsurf / leave

Method leave

splashsurf_lib/src/profiling.rs:161–168  ·  view source on GitHub ↗

Leave the scope at the top of the stack and increment its scope by the given duration

(&mut self, duration: Duration)

Source from the content-addressed store, hash-verified

159
160 /// Leave the scope at the top of the stack and increment its scope by the given duration
161 fn leave(&mut self, duration: Duration) {
162 if let Some(id) = self.scope_stack.pop() {
163 if let Some(scope) = self.scopes.get_mut(&id) {
164 scope.num_calls += 1;
165 scope.duration_sum += duration;
166 }
167 }
168 }
169
170 fn new_id(&self, name: &'static str, parent: Option<&ScopeId>) -> ScopeId {
171 ScopeId {

Callers 1

dropMethod · 0.80

Calls 1

get_mutMethod · 0.80

Tested by

no test coverage detected