Last active
August 25, 2017 16:48
-
-
Save lucindo/31604cba33a718c35d94afbd6d456cb9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
# Simple Timer | |
class Timer: | |
def __init__(self): | |
self.reset() | |
def reset(self): | |
self._start = time.time() | |
def elapsed(self): # elapsed time in seconds (float) | |
return time.time() - self._start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment