Skip to content

Instantly share code, notes, and snippets.

@mtovmassian
Created December 8, 2020 08:46
Show Gist options
  • Save mtovmassian/0ab2672cef0e98d11090e711c782a134 to your computer and use it in GitHub Desktop.
Save mtovmassian/0ab2672cef0e98d11090e711c782a134 to your computer and use it in GitHub Desktop.
Continuous display of time
#!/usr/bin/python3
from datetime import datetime
from time import sleep
while True:
time_ = datetime.now().strftime("%H:%M:%S:%f")[:-3]
print(f"\r{time_}", end="")
sleep(0.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment