summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST.in2
-rw-r--r--make.bat2
-rw-r--r--psutil/_psutil_windows.c15
3 files changed, 14 insertions, 5 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index 5b1d67c6..9753c6c6 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -4,7 +4,7 @@ include .gitignore
include .travis.yml
include appveyor.yml
include CREDITS
-include DEVNOTES.rst
+include DEVGUIDE.rst
include HISTORY.rst
include INSTALL.rst
include LICENSE
diff --git a/make.bat b/make.bat
index d456f0ce..718b4fb7 100644
--- a/make.bat
+++ b/make.bat
@@ -93,7 +93,7 @@ if "%1" == "build" (
if "%1" == "install" (
:install
call :build
- %PYTHON% setup.py install
+ %PYTHON% setup.py develop
goto :eof
)
diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c
index b3e68ac6..b8d1268d 100644
--- a/psutil/_psutil_windows.c
+++ b/psutil/_psutil_windows.c
@@ -188,7 +188,11 @@ psutil_get_nic_addresses() {
*/
static PyObject *
psutil_boot_time(PyObject *self, PyObject *args) {
- double uptime;
+#if (_WIN32_WINNT >= 0x0600) // Windows Vista
+ ULONGLONG uptime;
+#else
+ double uptime;
+#endif
time_t pt;
FILETIME fileTime;
long long ll;
@@ -212,10 +216,15 @@ psutil_boot_time(PyObject *self, PyObject *args) {
+ fileTime.dwLowDateTime;
pt = (time_t)((ll - 116444736000000000ull) / 10000000ull);
- // XXX - By using GetTickCount() time will wrap around to zero if the
+#if (_WIN32_WINNT >= 0x0600) // Windows Vista
+ uptime = GetTickCount64() / (ULONGLONG)1000.00f;
+#else
+ // GetTickCount() time will wrap around to zero if the
// system is run continuously for 49.7 days.
uptime = GetTickCount() / 1000.00f;
- return Py_BuildValue("d", (double)pt - uptime);
+#endif
+
+ return Py_BuildValue("d", (double)pt - (double)uptime);
}