No, sleep and usleep would be counter productive and just slow detection down. The whole beauty of iNotify is that the process sleeps until an event happens, and then its woken by the kernel and passed the event structure. The code as is takes next to zero system resources.
In reply to Re^3: Find the Files added to the directory in Linux.
by Loops
in thread Find the Files added to the directory in Linux.
by venky4289
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |