Skip to content

Instantly share code, notes, and snippets.

@dantsec
Created May 3, 2023 00:48
Show Gist options
  • Save dantsec/5815e539a70cc788080bf592436523e8 to your computer and use it in GitHub Desktop.
Save dantsec/5815e539a70cc788080bf592436523e8 to your computer and use it in GitHub Desktop.
Simple Cronometer made in Python
from time import sleep
hours = minutes = seconds = 0
try:
while(True):
if(seconds == 60):
seconds = 0
minutes += 1
if(minutes == 60):
minutes = 0
hours += 1
seconds += 1
sleep(1)
print(f"\t{hours} : {minutes} : {seconds}")
except KeyboardInterrupt:
exit(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment