mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-22 15:54:26 +00:00
12 lines
294 B
Python
12 lines
294 B
Python
import datetime, threading, time
|
|
|
|
def foo():
|
|
next_call = time.time()
|
|
while True:
|
|
print datetime.datetime.now()
|
|
next_call = next_call+1;
|
|
time.sleep(next_call - time.time())
|
|
|
|
timerThread = threading.Thread(target=foo)
|
|
timerThread.daemon = True
|
|
timerThread.start()
|