1
0
mirror of https://github.com/xmrig/xmrig.git synced 2026-01-23 23:02:51 -05:00

#1363 Fixed main thread priority.

This commit is contained in:
XMRig
2019-12-03 18:28:10 +07:00
parent c3fd5835c3
commit 05421057ae
7 changed files with 5 additions and 54 deletions

View File

@@ -131,43 +131,6 @@ void xmrig::Platform::restoreTimerResolution()
}
void xmrig::Platform::setProcessPriority(int priority)
{
if (priority == -1) {
return;
}
DWORD prio = IDLE_PRIORITY_CLASS;
switch (priority)
{
case 1:
prio = BELOW_NORMAL_PRIORITY_CLASS;
break;
case 2:
prio = NORMAL_PRIORITY_CLASS;
break;
case 3:
prio = ABOVE_NORMAL_PRIORITY_CLASS;
break;
case 4:
prio = HIGH_PRIORITY_CLASS;
break;
case 5:
prio = REALTIME_PRIORITY_CLASS;
break;
default:
break;
}
SetPriorityClass(GetCurrentProcess(), prio);
}
void xmrig::Platform::setThreadPriority(int priority)
{
if (priority == -1) {