Created
October 10, 2017 21:59
-
-
Save sjchoi86/fdb0b8d4f85ba3544ad4dfcb71a847f2 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
from datetime import datetime | |
tic_total = datetime.now() | |
tic = datetime.now() | |
print ("START") | |
while True: | |
toc_total = (datetime.now()-tic_total).total_seconds() | |
toc = (datetime.now()-tic).total_seconds() | |
tic = datetime.now() | |
if toc > 0.1: | |
print ("[%.3fsec] diff:[%.3fsec]" % (toc_total,toc)) | |
if toc_total > 200: | |
break | |
print ("DONE") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment