how to implement a watchdog timer in python?,time.sleep(0.1)