diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-01-11 10:46:23 -0800 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-01-11 10:46:23 -0800 |
commit | 4526fb11f18f361f4afc11484c768875e69de1a4 (patch) | |
tree | 9ec3756b7e723c45934259d5977062423a84a671 /psutil/_psutil_windows.c | |
parent | 3880e3f88d886234b3a4347a7ae3479cbecc6aaa (diff) | |
download | psutil-4526fb11f18f361f4afc11484c768875e69de1a4.tar.gz |
#1652: remove win XP code path checking avilability of GetTickCount64
Diffstat (limited to 'psutil/_psutil_windows.c')
-rw-r--r-- | psutil/_psutil_windows.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c index dd336489..d5928d72 100644 --- a/psutil/_psutil_windows.c +++ b/psutil/_psutil_windows.c @@ -101,17 +101,7 @@ psutil_boot_time(PyObject *self, PyObject *args) { ll = (((ULONGLONG) (fileTime.dwHighDateTime)) << 32) + fileTime.dwLowDateTime; pt = (time_t)((ll - 116444736000000000ull) / 10000000ull); - - if (GetTickCount64 != NULL) { - // Windows >= Vista - uptime = GetTickCount64() / 1000ull; - } - else { - // Windows XP. - // GetTickCount() time will wrap around to zero if the - // system is run continuously for 49.7 days. - uptime = (ULONGLONG)GetTickCount() / 1000ull; - } + uptime = GetTickCount64() / 1000ull; return Py_BuildValue("K", pt - uptime); } |