Lines Matching refs:Timer
23 # default logging level used by Timer class
228 class Timer(object):
232 >>> timer = Timer()
234 >>> print("First lap:", timer.split())
237 >>> print("Second lap:", timer.split())
239 >>> print("Overall time:", timer.time())
244 >>> with Timer() as t:
255 >>> with Timer(log, 'do something'):
259 The same Timer instance, holding a reference to a logger, can be reused
262 >>> timer = Timer(log)
263 >>> with timer():
266 >>> with timer('redo it', level=logging.INFO):
273 >>> @timer()
276 >>> @timer('run test 2', level=logging.INFO)
302 """ Reset timer to 'start_time' or the current time. """
311 """ Return the overall time (in seconds) since the timer started. """
345 """ End the current lap. If timer has a logger, log the time elapsed,
361 the wrapped function inside Timer's context manager.
363 Timer instance, referencing the same logger.