|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-23 21:53 UTC] tony2001@php.net
[2005-12-07 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 21:00:01 2025 UTC |
Description: ------------ When running sleep(), I noticed it does not always pause the script for the exact amount of time. Although the difference is no doubt neglectible, it is still noteable. Reproduce code: --------------- <?php $st = array_sum (explode (' ', microtime ())); sleep (1); echo round ((array_sum (explode (' ',microtime ())) - $st), 7); ?> Expected result: ---------------- I expect to see values ranging around 1.0000001 to 1.01 (depending on lag). Actual result: -------------- It returned the following: (including server lag) 0.9998388 0.9999161 1.001672