Add support for IBM AIX

In IBM AIX, CLOCK_MONOTONIC has value 10 and clockid_t type is long long.
This commit is contained in:
bthery 2017-02-20 14:36:41 +01:00 committed by GitHub
parent 8447153178
commit c50305e7f0
1 changed files with 2 additions and 0 deletions

View File

@ -150,6 +150,8 @@ except AttributeError:
CLOCK_MONOTONIC = 4 CLOCK_MONOTONIC = 4
elif 'bsd' in sys.platform: elif 'bsd' in sys.platform:
CLOCK_MONOTONIC = 3 CLOCK_MONOTONIC = 3
elif sys.platform.startswith('aix'):
CLOCK_MONOTONIC = ctypes.c_longlong(10)
def monotonic(): def monotonic():
"""Monotonic clock, cannot go backward.""" """Monotonic clock, cannot go backward."""