MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / Stop

Method Stop

inst/examples/SugarPerformance/Timer.h:35–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 Timer() : sys_time("Sys.time") { Reset(); }
34 void Start() { start_t = getFractionalSeconds() ; }
35 void Stop() {
36 end_t = getFractionalSeconds();
37 elapsed = end_t - start_t; // Calculate elapsed time in seconds
38 cumul += elapsed;
39 }
40 void Reset() { end_t = start_t = elapsed = cumul = 0.0; }
41 double ElapsedTime() { return elapsed; }
42 double CumulativeTime() { return cumul; }

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by 1

mainFunction · 0.64