MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / tick

Method tick

dm_control/viewer/util.py:264–273  ·  view source on GitHub ↗

Updates the timer. Returns: Time elapsed since the last call to this method.

(self)

Source from the content-addressed store, hash-verified

262 self._measured_time = 0.
263
264 def tick(self):
265 """Updates the timer.
266
267 Returns:
268 Time elapsed since the last call to this method.
269 """
270 curr_time = time.time()
271 self._measured_time = curr_time - self._previous_time
272 self._previous_time = curr_time
273 return self._measured_time
274
275 @contextlib.contextmanager
276 def measure_time(self):

Calls 1

timeMethod · 0.45