I wrote a loop in dash which waits for a file to appear in a certain location on the filesystem. But when it runs it takes up 50% of the CPU. I first lowered the CPU usage using a sleep command but the minimal sleep time in dash (1 second) is too long for me.
I need a way to sleep less than 1 second in bash or a different solution to lower the CPU usage of the loop. I only want to use programs that are installed by default on the most unix systems.