Re: [Libevent-users] optimize evutil_gettimeofday()'s Windows implementation

2012-06-18 Thread Nick Mathewson
On Fri, Jun 15, 2012 at 8:17 PM, Dave Hart wrote: > The code for evutil_gettimeofday() on Windows is: [...] > That substitutes a multiplication followed by subtraction in place of > the modulo 1 million.  While I haven't tested it, I believe mul + sub > will be faster than modulo (division).  I'm

[Libevent-users] optimize evutil_gettimeofday()'s Windows implementation

2012-06-15 Thread Dave Hart
The code for evutil_gettimeofday() on Windows is: /* Conversion logic taken from Tor, which in turn took it * from Perl. GetSystemTimeAsFileTime returns its value as * an unaligned (!) 64-bit value containing the number of * 100-nanosecond intervals since 1 Janu