php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8932 gettimeofday improvement suggestion
Submitted: 2001-01-26 08:13 UTC Modified: 2001-02-04 10:56 UTC
From: reijo dot vanhanen at helsoft dot fi Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.0.4 OS: W2K
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: reijo dot vanhanen at helsoft dot fi
New email:
PHP Version: OS:

 

 [2001-01-26 08:13 UTC] reijo dot vanhanen at helsoft dot fi
As implemented now, win32 gettimeofday does not give a consistent time because seconds and microseconds are collected with two different function calls.
A better solution, in my opinion, would be to use
win32 GetSystemTime function (together with mktime). This reduces accuracy to milliseconds, but time differences would be more reliable (no more extra 1 second errors in small times)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-29 09:04 UTC] reijo dot vanhanen at helsoft dot fi
I have a solution for this now, also for microtime
and usleep. How can I get the code to appropriate
place ??
 [2001-02-04 10:56 UTC] jmoore@php.net
Thanks for you patch, it is now in the CVS. In future make sure you also include any patches in the bug report (even if its a note added at a later date)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 14:01:28 2025 UTC