Skip to content

Instantly share code, notes, and snippets.

@sinewalker
Created July 13, 2018 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sinewalker/6ce06e49afad9e010228b4674e57f715 to your computer and use it in GitHub Desktop.
Save sinewalker/6ce06e49afad9e010228b4674e57f715 to your computer and use it in GitHub Desktop.
Python tick-tock
#!/usr/bin/env python
from time import sleep
from datetime import datetime
while True:
print(datetime.now())
sleep(1)
@sinewalker
Copy link
Author

prints the time every second. test python code for a simple systemd unit file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment