note 102566 deleted from function.microtime by danbrown
[email protected] Mon, 21 Feb 2011 19:41:27 -0800
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
Note Submitter: adrianguenter at gmail dot com
----
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);
?>