Skip to content

Commit

Permalink
Fallback on Kernel32.dll in cygwin
Browse files Browse the repository at this point in the history
  • Loading branch information
jvican committed Jul 3, 2018
1 parent 2761437 commit 0c8b937
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pynailgun/ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,10 @@ def _monotonic_time_nanos_windows():

monotonic_time_nanos = _monotonic_time_nanos_windows
elif sys.platform == "cygwin":
k32 = ctypes.CDLL("Kernel32", use_errno=True)
try:
k32 = ctypes.CDLL("Kernel32", use_errno=True)
except OSError:
k32 = ctypes.CDLL("Kernel32.dll", use_errno=True)
perf_frequency = ctypes.c_uint64()
k32.QueryPerformanceFrequency(ctypes.byref(perf_frequency))

Expand Down

0 comments on commit 0c8b937

Please sign in to comment.