This commit is contained in:
2023-08-22 18:55:00 +03:00
parent 6afb7f9f12
commit 4db0350dfe
5 changed files with 21 additions and 17 deletions

View File

@@ -10,6 +10,7 @@ import smtplib
import socket
import sox
import io
import time
from email.mime.multipart import MIMEMultipart
from email.mime.application import MIMEApplication
@@ -28,6 +29,12 @@ the_log = None
# 1 minute network timeout
NETWORK_TIMEOUT = 15
start_system_time = time.time()
start_monotonic_time = time.monotonic()
def get_monotonic_time():
return time.monotonic() - start_monotonic_time + start_system_time
def open_log_file(path: str, mode: str):
global the_log