diff --git a/README.rst b/README.rst index f59e213e81..2211efe09c 100644 --- a/README.rst +++ b/README.rst @@ -91,7 +91,7 @@ Optional packages: performance on Python older than 2.7.8, or on Python 3 before Python 3.4. - `pykerberos `_ is required for the GSSAPI authentication mechanism. -- `Monotime `_ adds support for +- `monotonic `_ adds support for a monotonic clock, which improves reliability in environments where clock adjustments are frequent. Not needed in Python 3.3+. - `wincertstore `_ adds support diff --git a/doc/installation.rst b/doc/installation.rst index 521026a9ca..dedcaace58 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -21,7 +21,7 @@ packages: performance on Python older than 2.7.8, or on Python 3 before Python 3.4. - `pykerberos `_ is required for the GSSAPI authentication mechanism. -- `Monotime `_ adds support for +- `monotonic `_ adds support for a monotonic clock, which improves reliability in environments where clock adjustments are frequent. Not needed in Python 3.3+. - `wincertstore `_ adds support diff --git a/pymongo/monotonic.py b/pymongo/monotonic.py index 106546ded8..2298ee0329 100644 --- a/pymongo/monotonic.py +++ b/pymongo/monotonic.py @@ -25,8 +25,12 @@ pass try: - # Monotime or Python 3.3+. - from time import monotonic as time + # From https://pypi.python.org/pypi/monotinic. + from monotonic import monotonic as time except ImportError: - # Not monotonic. - from time import time + try: + # Monotime or Python 3.3+. + from time import monotonic as time + except ImportError: + # Not monotonic. + from time import time