a
This commit is contained in:
@@ -53,10 +53,14 @@ def update():
|
|||||||
LAST_VALUE = time
|
LAST_VALUE = time
|
||||||
subprocess.run(["shutdown", "/a"])
|
subprocess.run(["shutdown", "/a"])
|
||||||
print("new val detected")
|
print("new val detected")
|
||||||
|
if (time == LAST_VALUE):
|
||||||
|
print("Nothing changed")
|
||||||
|
return
|
||||||
print("shutting down in " + str(time - now) + " seconds")
|
print("shutting down in " + str(time - now) + " seconds")
|
||||||
# subprocess.run(["shutdown", "/s", "/t", (time - now), " "])
|
# subprocess.run(["shutdown", "/s", "/t", (time - now), " "])
|
||||||
print(time - now)
|
print(time - now)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
while True:
|
||||||
update()
|
update()
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
Reference in New Issue
Block a user