MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / getElapsedTime

Method getElapsedTime

Timing-Functions/IntervalTimer.js:46–50  ·  view source on GitHub ↗

* @return {number} Elapsed time in milliseconds since reset.

(offset = 0)

Source from the content-addressed store, hash-verified

44 * @return {number} Elapsed time in milliseconds since reset.
45 */
46 getElapsedTime(offset = 0) {
47 this.timeElapsed = this.timer - this.prevInterval
48 this.prevInterval = this.timer
49 return this.timeElapsed - offset
50 }
51
52 /**
53 * @return {number} Elapsed time since start.

Callers 2

resetTimerMethod · 0.95
ExampleIntervalTimerFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected