Hi, > -----Original Message----- > From: Anatol Belski [mailto:[email protected]] On Behalf Of Anatol Belski > Sent: Saturday, December 16, 2017 3:03 PM > To: [email protected] > Cc: Niklas Keller <[email protected]> > Subject: [PHP-DEV] High resolution timer function > > Hi, > > I would like to propose a function for high resolution monotonic timing. There > was discussions about this before and a PR https://github.com/php/php- > src/pull/2368 which has issues and was abandoned. I've filed > https://github.com/php/php-src/pull/2976 with some reworked > implementation. > > A monotonic timer can be usable in several situations besides benchmarking. > Having a simple functionality like this in the core should be a useful > addition. The > current approach is a function returning array of [seconds, nanoseconds] and > optionally returning full nanosecond number as int on 64-bit or float on > 32-bit. > The first way is the most portable. Quite a few platforms are already > supported > by the current implementation. > > IMHO it should be fine to have a function like this in the core, perhaps also > a few > helper functions could be useful, too. I would like to pursue 7.3 with this. > Please > lets check for any concerns in general or with implementation, naming, etc. > If there are no further comments or objection, I would like to merge this patch anytime soon and see to add a couple of helper functions for diff/compare.
Regards Anatol -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
