How to use usleep() function to delay execution in microseconds in PHP

1 Answer

0 votes
// void usleep( int $micro_seconds )

echo date('h:i:s') . "<br />";

// wait 1 seconds
usleep(1000000);

echo date('h:i:s') . "<br />";

/*
run:

06:19:42
06:19:43
                           
*/

 



answered Mar 24, 2016 by avibootz

Related questions

1 answer 273 views
1 answer 330 views
1 answer 228 views
1 answer 314 views
1 answer 235 views
...