MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / seconds

Method seconds

tensorpack/utils/timer.py:146–155  ·  view source on GitHub ↗

Returns: float: the total number of seconds since the start/reset of the timer, excluding the time in between when the timer is paused.

(self)

Source from the content-addressed store, hash-verified

144 self._paused = False
145
146 def seconds(self):
147 """
148 Returns:
149 float: the total number of seconds since the start/reset of the timer, excluding the
150 time in between when the timer is paused.
151 """
152 if self._paused:
153 self.resume()
154 self.pause()
155 return timer() - self._start - self._total_paused

Callers 2

benchmark_serializerFunction · 0.95
_triggerMethod · 0.80

Calls 2

resumeMethod · 0.95
pauseMethod · 0.95

Tested by

no test coverage detected