Last active
February 22, 2020 23:16
-
-
Save EvelynSubarrow/a0ddf8f9c75ca8e460800cee8d8999c6 to your computer and use it in GitHub Desktop.
Inside you are two clocks, one system and one real time,,
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
#!/usr/bin/env python3 | |
import argparse, time, datetime, os | |
parser = argparse.ArgumentParser() | |
parser.add_argument("command", ) | |
args = parser.parse_args() | |
while True: | |
t1 = datetime.datetime.now() | |
time.sleep(1) | |
t2 = datetime.datetime.now() | |
if (t2-t1).seconds>10: | |
os.system(args.command) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment