diff --git a/platypush/entities/__init__.py b/platypush/entities/__init__.py index 665ec86ae..49b818269 100644 --- a/platypush/entities/__init__.py +++ b/platypush/entities/__init__.py @@ -1,6 +1,6 @@ import logging +import time from threading import Event -from time import time from typing import Collection, Optional from ._base import ( @@ -45,8 +45,8 @@ def get_entities_engine(timeout: Optional[float] = None) -> EntitiesEngine: :param timeout: Timeout in seconds (default: None). """ - time_start = time() - while not timeout or (time() - time_start < timeout): + time_start = time.time() + while not timeout or (time.time() - time_start < timeout): if _engine: break