Skip to content

Instantly share code, notes, and snippets.

@Michcioperz
Created February 19, 2014 15:18
Show Gist options
  • Save Michcioperz/9094107 to your computer and use it in GitHub Desktop.
Save Michcioperz/9094107 to your computer and use it in GitHub Desktop.
Raspberry Pi time measuring cron thing in Python because that's all I know
#!/usr/bin/env python2
import shutil, time, os
t = 0
def repeatable(t):
shutil.copyfile("/proc/uptime", ("/home/pi/msr/%s" % value(t)))
while 1:
os.chdir("/home/pi/msr")
repeatable(t)
time.sleep(60)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment