go ahead... be a heretic | |
PerlMonks |
Re: Media Player - CPU Usageby SuicideJunkie (Vicar) |
on Nov 28, 2012 at 19:01 UTC ( [id://1006092]=note: print w/replies, xml ) | Need Help?? |
You're using up 100% of one of the cores checking the conditions of the while loop as fast as possible. You need to sleep between checks.
Should do. Adjust the numbers depending on how much CPU you want to spend vs how quickly you want to notice that the loop condition has changed.
In Section
Seekers of Perl Wisdom
|
|