You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, PHP doesn't support and built-in way to access the system's monotonic time. That might change in PHP 7.2. I plan to implement a hrtime() function providing access to the high-resolution monotonic system time. If UV is available, but another loop is used, uv_hrtime() could be used in the meantime.
This issue exists to keep track of any improvements in PHP itself and to not forget implementing hrtime() in the future.
I still think that using a monotonic time source make perfect sense. However, this is currently not available on PHP by default and it's unclear when the above PR lands in a future PHP version.
I'd like to make this actionable, so I've just added relevant documentation via #130 and marked this ticket as resolved for now.
I'm happy to look into this again once a monotonic time source is available in PHP by default 👍
Activity
clue commentedon Feb 8, 2017
I think this makes perfect sense and I'm sure we're going to add this once we have a reliable
hrtime()implementation available 👍(FWIW, this has also already been reported as part of #34)
clue commentedon Nov 11, 2017
Ping @kelunik, what is the status here?
kelunik commentedon Nov 11, 2017
It didn't make it into PHP 7.2, maybe it'll be in PHP 7.3.
php/php-src#2368
clue commentedon Dec 4, 2017
I still think that using a monotonic time source make perfect sense. However, this is currently not available on PHP by default and it's unclear when the above PR lands in a future PHP version.
I'd like to make this actionable, so I've just added relevant documentation via #130 and marked this ticket as resolved for now.
I'm happy to look into this again once a monotonic time source is available in PHP by default 👍