Higher-resolution time for win32

Marc Lehmann schmorp at schmorp.de
Thu Jul 2 11:28:36 CEST 2009

On Wed, Jul 01, 2009 at 09:39:19PM -0400, Andy Grundman <andy at hybridized.org> wrote:
> I noticed the libev time resolution on Win32 was only 1ms.  Microsoft is 
> of course too horrible to fix this properly, so nasty hacks have been 
> developed.  I ported the one used by Time::HiRes and it appears to work 
> fine.  I don't expect this patch is good enough, but want to at least 
> start some discussion on the topic.

The CVS versioon already contains a higher resolution clock, and it
doesn't suffer from the problems you mention - it could use some testing
before release, however.

> The fact that time can move backwards is a bit worrying.  Although  
> Time::HiRes gets away with it!

All non-monotonic clocks can move backwards - is this backwards movement
jitter or just "the clock could change"? libev will automatically ajust if
that happens.

(there might be a mononotnic clock source available on windows, too, but I
lakc the tuits at the moment to look for one)

                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