updated usage of time.time to time.monotonic or time.perf_counter due to time.time possibly rolling backwards
This commit is contained in:
parent
b9bbf397c9
commit
45a23a6c14
11 changed files with 29 additions and 29 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue