Skip to content
Snippets Groups Projects
Commit e3912d8d authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Try with higher timeout and don't request immediate return.

parent edf508a8
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,8 @@ namespace ATxCommon ...@@ -42,7 +42,8 @@ namespace ATxCommon
Log.Trace("Querying WMI for CPU load..."); Log.Trace("Querying WMI for CPU load...");
var searcher = new ManagementObjectSearcher("select * from Win32_PerfFormattedData_PerfOS_Processor"); var searcher = new ManagementObjectSearcher("select * from Win32_PerfFormattedData_PerfOS_Processor");
var opts = new EnumerationOptions { var opts = new EnumerationOptions {
Timeout = new TimeSpan(0, 0, 2) Timeout = new TimeSpan(0, 0, 10),
ReturnImmediately = false,
}; };
searcher.Options = opts; searcher.Options = opts;
Int32 usageInt32 = -1; Int32 usageInt32 = -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment