• Dynamic sleep for infinite loops based on cpu

    May 11, 2017

    Based on this function http://ivangospodinow.com/php-how-to-calculate-system-processors-load-in-percent/ we are getting current cpu load. usleep(1000000 * systemLoadInPercent() / 100); Result: 54.3% cpu load, sleep 0.543 sec  

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org