note 125607 added to function.proc-nice
| From: | Anonymous@php.net | Date: | Wed, 16 Dec 2020 13:46:03 +0000 |
| Subject: | note 125607 added to function.proc-nice | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-215987@lists.php.net to get a copy of this message | ||
// In windows argument has no effect in ranges [-inf, -10], [-9, -5], [-4, 4], [5, 9], [10, inf]
PHPAPI int nice(zend_long p)
{
DWORD dwFlag = NORMAL_PRIORITY_CLASS ;
if (p < -9) dwFlag = HIGH_PRIORITY_CLASS ; else
if (p < -4) dwFlag = ABOVE_NORMAL_PRIORITY_CLASS ; else
if (p > 9) dwFlag = IDLE_PRIORITY_CLASS ; else
if (p > 4) dwFlag = BELOW_NORMAL_PRIORITY_CLASS ;
if (!SetPriorityClass(GetCurrentProcess(), dwFlag)) return -1;
return 0;
}
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.165 (proxied: 185.116.203.41)
----
Manual Page -- http://php.net/manual/en/function.proc-nice.php
Edit -- https://master.php.net/note/edit/125607
Del: integrated -- https://master.php.net/note/delete/125607/integrated
Del: useless -- https://master.php.net/note/delete/125607/useless
Del: bad code -- https://master.php.net/note/delete/125607/bad+code
Del: spam -- https://master.php.net/note/delete/125607/spam
Del: non-english -- https://master.php.net/note/delete/125607/non-english
Del: in docs -- https://master.php.net/note/delete/125607/in+docs
Del: other reasons-- https://master.php.net/note/delete/125607
Reject -- https://master.php.net/note/reject/125607
Search -- https://master.php.net/manage/user-notes.php