My program uses a while (!isKeyPressed(KEY_NSPIRE_ESC))
so it only exits when escape is pressed. This loops causes an annoying clock to appear, indicating heavy processor load, and also wastes battery. I have tried sleep(), but with numbers even as high as 500 milliseconds, the clock still ends up appearing, albeit taking more time to do so. Also, with numbers higher than 100 or so, a noticeable input lag appears. What is the proper way to fix this?