1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

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

View File

@@ -5134,7 +5134,7 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg)
startDataUnitNo.Value = 0; startDataUnitNo.Value = 0;
/* set priority to critical only when there are 2 or more CPUs on the system */ /* 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); SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
ci = crypto_open (); ci = crypto_open ();