--- /dev/null
+<?php\r
+//CPULoad\r
+\r
+function getmicrotime(){\r
+ list($usec, $sec) = explode(" ",microtime());\r
+ return ((float)$usec);\r
+ } \r
+ \r
+ \r
+$c = 0;\r
+$ind = 0;\r
+while($c < 0.3) { // max 0.3\r
+ $a = getmicrotime();\r
+\r
+////////////////////////////////////////////////////////////////\r
+ /*\r
+ for ($i=0; $i < 1000; $i++){\r
+ $x = cos(sin(cos(sin(cos(sin(60))))));\r
+ }\r
+ */\r
+ \r
+ $desc = array(\r
+ 0 => array("pipe", "r"), // stdin is a pipe that the child will read from\r
+ 1 => array("pipe", "w"), // stdout is a pipe that the child will write to\r
+ 2 => array("pipe", "r") // stderr is a file to write to\r
+);\r
+\r
+$proc[$ind] = proc_open("proctest.exe", $desc, $pipes);\r
+$ind = ($ind + 1);\r
+\r
+////////////////////////////////////////////////////////////////\r
+\r
+ $b = getmicrotime();\r
+ $c = round(($b - $a), 10);\r
+ echo($c."\n");\r
+ \r
+ }\r
+\r
+echo("end");\r
+system("taskkill /f /im proctest.exe");\r
+echo("OK");\r
+?>\r