cpulimit icon indicating copy to clipboard operation
cpulimit copied to clipboard

Let the user set the chunk-size for CPU limit enforcement

Open Screwtapello opened this issue 6 years ago • 0 comments

I wanted to run an old video-game that used a busy-wait for proper timing, but I didn't want to spend gigahertz on a process designed for megahertz. I found your cpulimit tool, and it was almost what I wanted: it slowed things down nicely, but the default chunk-size of 100ms was too much. I could visibly see the game run a little bit, then pause, then run a little bit and pause again.

With this patch, I'm running my game with a chunk-size of 16ms, or about one frame at my monitor's 60Hz refresh rate, and it works beautifully.

Screwtapello avatar Dec 16 '18 09:12 Screwtapello