package host // Windows "Processor scheduling" (System Properties > Advanced > Performance > // Advanced): Programs gives the foreground window's process longer CPU // quanta, Background services gives every process the same fixed quanta. const ( SchedulingPrograms = "programs" SchedulingBackground = "background" ) // SchedulingFromPrioritySeparation reads the setting from the registry's // Win32PrioritySeparation value: its low two bits are the foreground quantum // boost, which Programs sets (0x26 from that dialog, 0x2 on a fresh install) // and Background services clears (0x18). func SchedulingFromPrioritySeparation(v uint32) string { if v&0x3 != 0 { return SchedulingPrograms } return SchedulingBackground }