MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / getClockTime

Method getClockTime

src/openms/source/SYSTEM/StopWatch.cpp:138–153  ·  view source on GitHub ↗

getClockTime returns the current amount of real (clock) time accumulated by this stop_watch. If the stop_watch is stopped, this is just the total accumulated time. If the stop_watch is running, this is the accumulated time + the time since the stop_watch was last started.

Source from the content-addressed store, hash-verified

136 //the total accumulated time. If the stop_watch is running, this is the
137 //accumulated time + the time since the stop_watch was last started.
138 double StopWatch::getClockTime() const
139 {
140 if (is_running_ == false)
141 {
142 /* stop_watch is currently off, so just return accumulated time */
143 return accumulated_times_.clockTime();
144 }
145
146 /* stop_watch is currently running, so add the elapsed time since */
147 /* the stop_watch was last started to the accumulated time */
148 auto now = snapShot_();
149 auto diff = now - last_start_;
150
151 /* convert into floating point number of seconds */
152 return accumulated_times_.clockTime() + diff.clockTime();
153 }
154
155 //getUserTime reports the current amount of user cpu time
156 //accumulated by this StopWatch. If the stop_watch is currently off,

Callers 10

toStringMethod · 0.95
mainFunction · 0.80
mainFunction · 0.80
applyFunctorOnCCsMethod · 0.80
applyFunctorOnCCsSTMethod · 0.80
run_Method · 0.80
computeMethod · 0.80
computeSliceOld_Method · 0.80
endProgressMethod · 0.80
StopWatch_test.cppFile · 0.80

Calls 1

clockTimeMethod · 0.80

Tested by

no test coverage detected