Re: Fwd: Monotonic Time
| From: | Niklas Keller | Date: | Fri, 13 Jan 2017 09:35:24 +0000 |
| Subject: | Re: Fwd: Monotonic Time | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-97740@lists.php.net to get a copy of this message | ||
>
> > > 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
> performance testing, at the start at least. I made some refactoring to it
> yesterday, so it is now possible to implement an arbitrary userspace timer
> using the HRTime\PerformanceCounter class. Maybe should add also
> HRTime\Timer, but it should first get a thought about some good API
> approach.
>
> The portable parts are bundled files timer.[h|c] in the hrtime repo,
> supporting POSIX, Windows and Mac. They can be reused, or taken as an
> example, for sure.
Hi Anatol,
Do you think we should merge hrtime into core or add a simple function just
like microtime() to ext/standard?
Regards, Niklas