1
Discussion - Software / EVE code CPU usage - is it safe to sleep()?
« on: March 11, 2019, 11:54:42 AM »
I'm running the exported code from EVE Screen Designer (4.5 Beta 2) on a BeagleBoard running Linux (I've adapted some of the HAL).
It's running fine, but using 100% of the CPU, because FT_Esd_MainLoop is running a tight loop with no yield or sleep.
I am wondering if it is OK to add a sleep in the main loop?
If so, is there some constraint as to how often I need to let the main loop run, or does it just need to be fast enough to redraw the screen at the rate I require (so, 1Hz would probably be fine for my application, but I'll probably run it rather faster)?
I'm not using touch controls.
It's running fine, but using 100% of the CPU, because FT_Esd_MainLoop is running a tight loop with no yield or sleep.
I am wondering if it is OK to add a sleep in the main loop?
If so, is there some constraint as to how often I need to let the main loop run, or does it just need to be fast enough to redraw the screen at the rate I require (so, 1Hz would probably be fine for my application, but I'll probably run it rather faster)?
I'm not using touch controls.