Author: Mark Young <[email protected]>
Branch: py3k
Changeset: r85273:577eaa27faf2
Date: 2016-05-24 21:16 -0400
http://bitbucket.org/pypy/pypy/changeset/577eaa27faf2/
Log: Let's try this.
diff --git a/pypy/module/time/interp_time.py b/pypy/module/time/interp_time.py
--- a/pypy/module/time/interp_time.py
+++ b/pypy/module/time/interp_time.py
@@ -111,6 +111,13 @@
self.n_overflow = 0
self.last_ticks = 0
time_state = TimeState()
+ from rpython.rlib.rdynload import GetModuleHandle, dlsym
+ hKernel32 = GetModuleHandle("KERNEL32")
+ try:
+ dlsym(hKernel32, 'GetFinalPathNameByHandleW')
+ HAS_GETTICKCOUNT64 = True
+ except KeyError:
+ HAS_GETTICKCOUNT64 = False
_includes = ["time.h"]
if _POSIX:
@@ -194,7 +201,6 @@
CLOCKS_PER_SEC = cConfig.CLOCKS_PER_SEC
HAS_CLOCK_GETTIME = cConfig.has_clock_gettime
-HAS_GETTICKCOUNT64 = cConfig.has_gettickcount64
clock_t = cConfig.clock_t
tm = cConfig.tm
glob_buf = lltype.malloc(tm, flavor='raw', zero=True, immortal=True)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit