Can anyone explain me how usleep or sleep helps to unload the CPU.
I have written sample code as below.
while (1) // check if the data file has been modified
{
usleep(10000); // sleep 10ms to unload the CPU**
clearstatcache();
$currentmodif = filemtime($filename);
}