Re: [PHP-DEV] Fwd: Monotonic Time

2017-02-06 Thread Fleshgrinder
On 2/6/2017 1:33 PM, Anatol Belski wrote: > With the names and API, probably some more clarity should be. AFM, > the low level units should be exposed, rather than a concrete time. > Also, the name hrtime() is probably not much speaking. Maybe these > three? > > sys_get_monotonic_ticks() > sys_get

RE: [PHP-DEV] Fwd: Monotonic Time

2017-02-06 Thread Anatol Belski
Hi Niklas, > -Original Message- > From: Niklas Keller [mailto:m...@kelunik.com] > Sent: Sunday, February 5, 2017 8:19 PM > To: Anatol Belski > Cc: Leigh ; Michael Wallner ; PHP Internals > ; Bob Weinand ; Daniel Lowrey > > Subject: Re: [PHP-DEV] Fwd: Mo

Re: [PHP-DEV] Fwd: Monotonic Time

2017-02-05 Thread Niklas Keller
I have implemented a `hrtime()` function which allows access to the system's monotonic time in nanoseconds. > > https://github.com/php/php-src/compare/master...kelunik:hrtime Feedback is very welcome. I'm not sure whether we should allow a parameter for the time unit or just let the user do the s

Re: [PHP-DEV] Fwd: Monotonic Time

2017-01-14 Thread Niklas Keller
> > Hi, > > > -Original Message- > > From: Niklas Keller [mailto:m...@kelunik.com] > > Sent: Friday, January 13, 2017 4:46 PM > > To: Leigh > > Cc: Anatol Belski ; Michael Wallner >; > > PHP Internals ; Bob Weinand ; > > Daniel

RE: [PHP-DEV] Fwd: Monotonic Time

2017-01-14 Thread Anatol Belski
Hi, > -Original Message- > From: Niklas Keller [mailto:m...@kelunik.com] > Sent: Friday, January 13, 2017 4:46 PM > To: Leigh > Cc: Anatol Belski ; Michael Wallner ; > PHP Internals ; Bob Weinand ; > Daniel Lowrey > Subject: Re: [PHP-DEV] Fwd: Monotonic Time >

Re: [PHP-DEV] Fwd: Monotonic Time

2017-01-13 Thread Niklas Keller
2017-01-13 15:06 GMT+01:00 Leigh : > On Fri, 13 Jan 2017 at 09:35 Niklas Keller wrote: > > > Hi Anatol, > > > > Do you think we should merge hrtime into core or add a simple function > just > > like microtime() to ext/standard? > > > > Regards, Niklas > > > > It would be great if it could be a si

Re: [PHP-DEV] Fwd: Monotonic Time

2017-01-13 Thread Leigh
On Fri, 13 Jan 2017 at 09:35 Niklas Keller wrote: > Hi Anatol, > > Do you think we should merge hrtime into core or add a simple function just > like microtime() to ext/standard? > > Regards, Niklas > It would be great if it could be a simple function, however it is going to be difficult to prod

Re: [PHP-DEV] Fwd: Monotonic Time

2017-01-13 Thread Niklas Keller
> > > > Actually, it seems, that hrtime doesn't let you access the current > > > value, which is, well, quite a major use case, isn't it? > > > > > > Yes, that seemed weird to me, too. Did we miss anything, Anatol? > > > Yeah, I thought I did that already, but well ... The ext was more about > per

Re: [PHP-DEV] Fwd: Monotonic Time

2017-01-07 Thread Niklas Keller
> > Hi! > > > I think we can reuse parts of it to implement a function in core to > access > > a monotonic time, I don't think we need to merge the extension into core. > > What's wrong with just having an extension? > Do you mean an external (not bundled) extension? Simply not having it availabl

Re: [PHP-DEV] Fwd: Monotonic Time

2017-01-06 Thread Stanislav Malyshev
Hi! > I think we can reuse parts of it to implement a function in core to access > a monotonic time, I don't think we need to merge the extension into core. What's wrong with just having an extension? -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List

RE: [PHP-DEV] Fwd: Monotonic Time

2017-01-06 Thread Anatol Belski
Hi, > -Original Message- > From: Niklas Keller [mailto:m...@kelunik.com] > Sent: Thursday, January 5, 2017 2:27 AM > To: Michael Wallner ; Anatol Belski > Cc: PHP Internals > Subject: Re: [PHP-DEV] Fwd: Monotonic Time > > > > > Actually, it seems, that

Re: [PHP-DEV] Fwd: Monotonic Time

2017-01-04 Thread Niklas Keller
> > Actually, it seems, that hrtime doesn't let you access the current > value, which is, well, quite a major use case, isn't it? Yes, that seemed weird to me, too. Did we miss anything, Anatol? Regards, Niklas

Re: [PHP-DEV] Fwd: Monotonic Time

2017-01-04 Thread Michael Wallner
On 04/01/17 13:58, Niklas Keller wrote: > Resending previous mail, because mail distribution was broken... > > Morning Internals, > > PHP doesn't currently have a way to access a monotonic time. There's a > feature request in the bug tracker: bugs [dot] php [dot] > net/bug.php?id=68029 > > A mon