updated usage of time.time to time.monotonic or time.perf_counter due to time.time possibly rolling backwards

This commit is contained in:
Blake Harnden 2019-12-06 09:42:41 -08:00
parent b9bbf397c9
commit 45a23a6c14
11 changed files with 29 additions and 29 deletions

View file

@ -660,7 +660,7 @@ class CoreGrpcServer(core_pb2_grpc.CoreApiServicer):
last_check = None
last_stats = None
while self._is_running(context):
now = time.time()
now = time.monotonic()
stats = get_net_stats()
# calculate average

View file

@ -1710,7 +1710,7 @@ class CoreHandler(socketserver.BaseRequestHandler):
event_type=event_type,
name=name,
data=fail_data + ";" + unknown_data,
time=str(time.time()),
time=str(time.monotonic()),
)
self.session.broadcast_event(event_data)