MCPcopy Create free account
hub / github.com/LynnHo/EigenGAN-Tensorflow / __init__

Method __init__

pylib/timer.py:29–34  ·  view source on GitHub ↗
(self, fmt='s', print_at_exit=True, timer=timeit.default_timer)

Source from the content-addressed store, hash-verified

27 """
28
29 def __init__(self, fmt='s', print_at_exit=True, timer=timeit.default_timer):
30 assert fmt in ['ms', 's', 'datetime'], "`fmt` should be 'ms', 's' or 'datetime'!"
31 self._fmt = fmt
32 self._print_at_exit = print_at_exit
33 self._timer = timer
34 self.start()
35
36 def __enter__(self):
37 """Start the timer in the context manager scope."""

Callers

nothing calls this directly

Calls 1

startMethod · 0.95

Tested by

no test coverage detected