Skip to content
This repository was archived by the owner on Apr 10, 2021. It is now read-only.

Commit d261cf6

Browse files
committed
Remove get_os_release() / compare_versions()
The sole purpose of these functions was to determine whether or not to use CLOCK_MONOTONIC_RAW (which is available on Linux 2.6.3+). Since we are no longer using CLOCK_MONOTONIC_RAW, they are not necessary.
1 parent a29eb94 commit d261cf6

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

monotonic.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
import ctypes
4242
import ctypes.util
4343
import os
44-
import platform
4544
import re
4645
import sys
4746
import time
@@ -50,18 +49,6 @@
5049
__all__ = ('monotonic',)
5150

5251

53-
def get_os_release():
54-
"""Get the leading numeric component of the OS release."""
55-
return re.match('[\d.]+', platform.release()).group(0)
56-
57-
58-
def compare_versions(v1, v2):
59-
"""Compare two version strings."""
60-
def normalize(v):
61-
return map(int, re.sub(r'(\.0+)*$', '', v).split('.'))
62-
return cmp(normalize(v1), normalize(v2))
63-
64-
6552
try:
6653
monotonic = time.monotonic
6754
except AttributeError:

0 commit comments

Comments
 (0)