Skip to content

Commit 13f86c5

Browse files
felixonmarsbehackett
authored andcommitted
PYTHON-1009 Switch from "Monotime" to "monotonic"
1 parent 29df784 commit 13f86c5

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Optional packages:
9191
performance on Python older than 2.7.8, or on Python 3 before Python 3.4.
9292
- `pykerberos <https://pypi.python.org/pypi/pykerberos>`_ is required for
9393
the GSSAPI authentication mechanism.
94-
- `Monotime <https://pypi.python.org/pypi/Monotime>`_ adds support for
94+
- `monotonic <https://pypi.python.org/pypi/monotonic>`_ adds support for
9595
a monotonic clock, which improves reliability in environments
9696
where clock adjustments are frequent. Not needed in Python 3.3+.
9797
- `wincertstore <https://pypi.python.org/pypi/wincertstore>`_ adds support

doc/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ packages:
2121
performance on Python older than 2.7.8, or on Python 3 before Python 3.4.
2222
- `pykerberos <https://pypi.python.org/pypi/pykerberos>`_ is required for
2323
the GSSAPI authentication mechanism.
24-
- `Monotime <https://pypi.python.org/pypi/Monotime>`_ adds support for
24+
- `monotonic <https://pypi.python.org/pypi/monotonic>`_ adds support for
2525
a monotonic clock, which improves reliability in environments
2626
where clock adjustments are frequent. Not needed in Python 3.3+.
2727
- `wincertstore <https://pypi.python.org/pypi/wincertstore>`_ adds support

pymongo/monotonic.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@
2525
pass
2626

2727
try:
28-
# Monotime or Python 3.3+.
29-
from time import monotonic as time
28+
# From https://pypi.python.org/pypi/monotinic.
29+
from monotonic import monotonic as time
3030
except ImportError:
31-
# Not monotonic.
32-
from time import time
31+
try:
32+
# Monotime or Python 3.3+.
33+
from time import monotonic as time
34+
except ImportError:
35+
# Not monotonic.
36+
from time import time

0 commit comments

Comments
 (0)