Last active
September 5, 2017 18:22
-
-
Save LorbusChris/54a21cf0ca186fa76a1ed1ce70006505 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doWork () { | |
var timer = new Date (); | |
// do n cyles of work here | |
timer = new Date () - timer; // time spent working | |
setTimeout (doWork, timer); // wait an equivalent time for 50% processor load | |
} | |
also investigate: | |
target_cpu_utilization_percentage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment