-
-
Save dvillega/205ac005386e154c1a05af07c825be3c to your computer and use it in GitHub Desktop.
This file contains 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