import os
import time
import datetime
now=datetime.datetime.now()
first=(60*now.minute+now.second)*1000000+now.microsecond

os.system("sudo bash -c \"echo none > /sys/class/leds/led0/trigger\"")
os.system("sudo bash -c \"echo 0 > /sys/class/leds/led0/brightness\"")
os.system("sudo bash -c \"echo none > /sys/class/leds/led1/trigger\"")
os.system("sudo bash -c \"echo 0 > /sys/class/leds/led1/brightness\"")

os.system("sudo bash -c \"echo cpu0 > /sys/class/leds/led0/trigger\"")
os.system("sudo bash -c \"echo 1 > /sys/class/leds/led0/brightness\"")
os.system("sudo bash -c \"echo input > /sys/class/leds/led1/trigger\"")
os.system("sudo bash -c \"echo 1 > /sys/class/leds/led1/brightness\"")
now=datetime.datetime.now()
last=(60*now.minute+now.second)*1000000+now.microsecond

print (last-first)/1000
