What are some potential pitfalls of using usleep() function in PHP for waiting?

One potential pitfall of using usleep() function in PHP for waiting is that it can cause unnecessary CPU usage as the script will continue to run in a loop until the specified time has passed. To avoid this, it is recommended to use sleep() function instead, which will put the script to sleep for the specified number of seconds without consuming CPU resources unnecessarily.

// Using sleep() function instead of usleep() to avoid unnecessary CPU usage
sleep(1); // Sleep for 1 second