Higher-resolution time for win32
schmorp at schmorp.de
Thu Jul 2 18:49:35 CEST 2009
On Thu, Jul 02, 2009 at 09:21:09AM -0400, Andy Grundman <andy at hybridized.org> wrote:
> value every 1ms.) That's the main issue I was trying to fix. It's a
Yeah, but you can't really fix it. Such exact clocks are simply not
generally available on typical PC style hardware.
Note that if you want to benchmark a piece of code, than using the
performance counters might be a good idea. For measuring time, they are a
>> Also note that libev doesn't guarantee any higher precision then
>> 1ms even on systems supporting higher resolutions.
> Really? I thought Linux/Mac would be fine in this respect.
The epoll *API* is not more exact than 1ms, no matter how good the
implementation is (and the implementation usually worse, depends on amny
And I doubt anything is fine on Mac. The fact that instead of fixing
kqueue they now also broke poll is a typical example, not the exception. I
would be surprised if macs had better then 100hz granularity in libev, and
seriously shocked if it was better than 1000hz.
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / pcg at goof.com
More information about the libev