note 102566 added to function.microtime
[email protected] Mon, 21 Feb 2011 19:27:18 -0800
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
After reading Jamie's note (http://us3.php.net/manual/en/function.microtime.php#101628) and confirming that this is indeed the behavior of the time and microtime functions, I have written an extension that provides full clock_gettime support in PHP. It is as fast as (actually usually slighty faster than, by a few percent, during my benchmarking) microtime and returns a double.
Available here: http://github.com/adrianguenter/php_bettertime
<?php
$x = clock_gettime(CLOCK_MONOTONIC);
?>
----
Server IP: 192.41.42.26
Probable Submitter: 76.106.168.150
----
Manual Page -- http://www.php.net/manual/en/function.microtime.php
Edit -- https://master.php.net/note/edit/102566
Del: integrated -- https://master.php.net/note/delete/102566/integrated
Del: useless -- https://master.php.net/note/delete/102566/useless
Del: bad code -- https://master.php.net/note/delete/102566/bad+code
Del: spam -- https://master.php.net/note/delete/102566/spam
Del: non-english -- https://master.php.net/note/delete/102566/non-english
Del: in docs -- https://master.php.net/note/delete/102566/in+docs
Del: other reasons-- https://master.php.net/note/delete/102566
Reject -- https://master.php.net/note/reject/102566
Search -- https://master.php.net/manage/user-notes.php