php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35355 sleep() not always accurate
Submitted: 2005-11-23 21:50 UTC Modified: 2005-12-07 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: CaptSushekECF at aol dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5.0.5 OS: Apache
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: CaptSushekECF at aol dot com
New email:
PHP Version: OS:

 

 [2005-11-23 21:50 UTC] CaptSushekECF at aol dot com
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-23 21:53 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-12-07 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC