#13 ConsolePlayer uses 100% CPU time when paused

open
nobody
None
5
2007-02-10
2007-02-10
Roland Hermans
No

When sidplay2 is paused by pressing the P key during playback the program enters a busy waiting loop until the P key is pressed again. On my Linux system this results in the CPU usage being 100% while sidplay2 is being paused.

The supplied patch uses usleep() to insert a pause of 0.1 second before each keyboard check, eliminating the 100% CPU time usage problem.

Discussion

  • Roland Hermans
    Roland Hermans
    2007-02-10

    Patch for ConsolePlayer class not to use 100% CPU time while playback is being paused

     
    Attachments