Higher-resolution time for win32

Marc Lehmann schmorp at schmorp.de
Thu Jul 2 11:34:27 CEST 2009


On Wed, Jul 01, 2009 at 09:39:19PM -0400, Andy Grundman <andy at hybridized.org> wrote:
> Two problems with this patch:

Actually, looking at it, it patches against the higher-resolution clock
alraedy in use in CVS. on the w2000, xp and vista amchiens I tested,
the resolution is much higher than 1ms - are you sure it only has 1ms
resolution?  In that case it might be worthwhile to investigate why your
machine has such a low resolution when the reslution approaches more like
25µs over such a wide variatey of windows versions normally.

The method you propose is totally unworkable on multicore machines, and
requires special hardware to begin with. It cannot be used inside a
portable library (if you google for a while, you will see that this emthod
is often implemented for a while in other libraries, and then removed,
because it doesn't work in practise).

Also note that libev doesn't guarantee any higher precision then around
1ms even on systems supporting higher resolutions.

-- 
                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 mailing list