php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64959 PHP must have the ability support nanoseconds
Submitted: 2013-06-03 01:44 UTC Modified: 2013-07-24 07:52 UTC
Votes:2
Avg. Score:3.5 ± 1.5
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: zf at ancientrocklab dot com Assigned:
Status: Wont fix Package: Date/time related
PHP Version: 5.4.15 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-06-03 01:44 UTC] zf at ancientrocklab dot com
Description:
------------
PHP must have the ability support nanoseconds.
In today high traffic and high load website. We really need to support 
nanoseconds.
think about it, in per seconds, their maybe more than 1 million trades, if you 
have not nonoseconds.
how can you know the real time it be?
We can now only using scripts like : 

echo passthru("date +%s.%N");

but this way is not native, so please add support it .
just like support microtime.

You guys may know Java has Nanoseconds function.
http://docs.oracle.com/javase/7/docs/api/java/lang/System.html#nanoTime()

Java is ready for bussiness. but what about PHP?


Test script:
---------------
NO function can return nanoseconds native.

Expected result:
----------------
nanoseconds

Actual result:
--------------
no way to got it.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-24 07:52 UTC] ab@php.net
-Status: Open +Status: Wont fix
 [2013-07-24 07:52 UTC] ab@php.net
Citation from the page you've linked
"This method provides nanosecond precision, but not necessarily nanosecond resolution 
(that is, how frequently the value changes) - no guarantees are made except that the 
resolution is at least as good as that of currentTimeMillis()."

Java has the exact the same issue as any other, because the cause of it is in the 
hardware/os. You can see many simimlar issues even with microtime resolution. That way 
it'll never handle 1e6 or more deals per second. So let's wait until java is forearmed 
for business, php will follow ;)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 00:01:41 2024 UTC