Last active
December 9, 2019 08:04
-
-
Save rayanfer32/01bba89fc3e943ec22d1c7d346a94849 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
class stopwatch: | |
import time | |
def start(): | |
store = time.time() | |
return store | |
def stop(store): | |
elapsed = time.time() - store | |
print("elapsed",elapsed,"seconds!") | |
## eg (set a variable with current time): | |
# eg_time = stopwatch.start() | |
# stopwatch.stop(eg_time) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment