//go:build !windows

package deploy

import (
	"syscall"
)

func SetProcessPriority(priority string) error {
	nice := 5
	switch priority {
	case "idle":
		nice = 19
	case "below_normal":
		nice = 10
	case "normal":
		nice = 5
	case "above_normal":
		nice = 0
	case "high":
		nice = -5
	}
	return syscall.Setpriority(syscall.PRIO_PROCESS, 0, nice)
}
