Windows: don't change thread priority when benchmarking encryption algorithms for more accurate results

This commit is contained in:
Mounir IDRASSI 2016-12-06 23:38:20 +01:00
parent 91e0de6145
commit 77e665520e
No known key found for this signature in database
GPG Key ID: DD0C382D5FCFB8FC

View File

@ -5134,7 +5134,7 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg)
startDataUnitNo.Value = 0;
/* set priority to critical only when there are 2 or more CPUs on the system */
if (sysInfo.dwNumberOfProcessors > 1)
if (sysInfo.dwNumberOfProcessors > 1 && (benchmarkType != BENCHMARK_TYPE_ENCRYPTION))
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
ci = crypto_open ();