Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use monotonic time when available #73

Closed
kelunik opened this issue Feb 5, 2017 · 4 comments
Closed

Use monotonic time when available #73

kelunik opened this issue Feb 5, 2017 · 4 comments

Comments

@kelunik
Copy link
Contributor

kelunik commented Feb 5, 2017

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.

https://externals.io/thread/592#email-14248 updated: https://externals.io/message/97502

@clue
Copy link
Member

clue commented 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 clue removed the bug label Apr 25, 2017
@clue
Copy link
Member

clue commented Nov 11, 2017

Ping @kelunik, what is the status here? :shipit:

@kelunik
Copy link
Contributor Author

kelunik commented 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
Copy link
Member

clue commented 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 👍

@clue clue added this to the v0.5.0 milestone Mar 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants