Skip to content

Instantly share code, notes, and snippets.

@m-root
Last active May 31, 2018 16:11
Show Gist options
  • Save m-root/a95d5162f457cb8f675f1015fb8e5c84 to your computer and use it in GitHub Desktop.
Save m-root/a95d5162f457cb8f675f1015fb8e5c84 to your computer and use it in GitHub Desktop.
top of the minute
endtime = time.time() + 60
while time.time() < endtime:
value = datetime.utcnow().strftime("%S")
entTime = int(value)
print(60 - entTime)
time.sleep(1)
if entTime == 0:
break
############ SAME THING #############
currentTime = datetime.utcnow().strftime("%M")
while currentTime == datetime.utcnow().strftime("%M"):
print(60 - int(datetime.utcnow().strftime("%S")))
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment