Skip to content

Commit 7761a53

Browse files
committed
use monotonic clock on wait_ready for attributes
1 parent 66b3f6b commit 7761a53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dronekit/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,10 +2133,10 @@ def wait_ready(self, *types, **kwargs):
21332133

21342134
# Wait for these attributes to have been set.
21352135
await = set(types)
2136-
start = time.time()
2136+
start = monotonic.monotonic()
21372137
while not await.issubset(self._ready_attrs):
21382138
time.sleep(0.1)
2139-
if time.time() - start > timeout:
2139+
if monotonic.monotonic() - start > timeout:
21402140
if raise_exception:
21412141
raise APIException('wait_ready experienced a timeout after %s seconds.' %
21422142
timeout)

0 commit comments

Comments
 (0)