Last active
November 13, 2018 03:25
-
-
Save yancyn/76e7cfb35689789326fa8aeafc61c46f to your computer and use it in GitHub Desktop.
Write Log File to Pi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import threading | |
def refresh(): | |
# refresh every 10 minutes | |
threading.Timer(600.0, refresh).start() | |
fs = open("active.log","a") | |
i=datetime.datetime.now() | |
print >>fs, i.isoformat() | |
fs.close() | |
refresh() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment