Skip to content

Commit 7bf79eb

Browse files
committed
Use time_since in process_visit.
1 parent f3724f3 commit 7bf79eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/activator/activator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,11 +573,11 @@ def process_visit(expected_visit: FannedOutVisit):
573573

574574
_log.debug("Waiting for snaps...")
575575
start = time.time()
576-
while len(expid_set) < expected_snaps and time.time() - start < timeout:
576+
while len(expid_set) < expected_snaps and time_since(start) < timeout:
577577
if startup_response:
578578
response = startup_response
579579
else:
580-
time_remaining = max(0.0, timeout - (time.time() - start))
580+
time_remaining = max(0.0, timeout - time_since(start))
581581
response = consumer.consume(num_messages=1, timeout=time_remaining + 1.0)
582582
end = time.time()
583583
messages = _filter_messages(response)

0 commit comments

Comments
 (0)