Because a keyloop function can slow down overall system performance, we recommend calling the system API function DosSleep() from your keyloop function to improve the system performance.