Skip to content

Instantly share code, notes, and snippets.

@sjchoi86
Created October 10, 2017 21:59
Show Gist options
  • Save sjchoi86/fdb0b8d4f85ba3544ad4dfcb71a847f2 to your computer and use it in GitHub Desktop.
Save sjchoi86/fdb0b8d4f85ba3544ad4dfcb71a847f2 to your computer and use it in GitHub Desktop.
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