瀏覽代碼

Merge pull request #12179 from ghalliday/issue21252b

HPCC-21252 Fix runtime error getting cpu stats on windows

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 6 年之前
父節點
當前提交
6af9cfc04e
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      system/jlib/jdebug.cpp

+ 2 - 1
system/jlib/jdebug.cpp

@@ -806,8 +806,9 @@ CpuInfo CpuInfo::operator - (const CpuInfo & rhs) const
 bool CpuInfo::getProcessTimes()
 {
 #ifdef _WIN32
+    FILETIME creationTime, exitTime;
     FILETIME kernelTime, userTime;
-    GetProcessTimes(GetCurrentProcess(), nullptr, nullptr, &kernelTime, &userTime);
+    GetProcessTimes(GetCurrentProcess(), &creationTime, &exitTime, &kernelTime, &userTime);
 
     user = extractFILETIME(userTime);
     system = extractFILETIME(kernelTime);