Skip to content

Instantly share code, notes, and snippets.

@lucindo
Last active August 25, 2017 16:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lucindo/31604cba33a718c35d94afbd6d456cb9 to your computer and use it in GitHub Desktop.
Save lucindo/31604cba33a718c35d94afbd6d456cb9 to your computer and use it in GitHub Desktop.
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