getProcessPriority

fnProcessPriority getProcessPriority(int pid) @trusted

Gets the current process priority/nice value.

Returns

ProcessPriority enum value representing current priority.

Parameters

pidProcess ID (use 0 for current process).

Throws

NoSuchProcess if process doesn't exist.

PlatformNotSupported if not implemented on this platform.

Example:

auto priority = getProcessPriority(0);
writeln("Current priority: ", priority);