[Libwebsockets] The implemenation of gettimeofday is wrong on Windows

"Andy Green (林安廸)" andy at warmcat.com
Tue Mar 5 01:44:10 CET 2013


On 05/03/13 02:59, the mail apparently from Arokux B. included:
> Hi,
>
> in win32port/win32helpers/gettimeofday.c first we need to convert to
> microseconds and only then subtract.
>
> This is the *correct* code:
>
> 		tmpres /= 10;  /*convert into microseconds*/
>
> 		/*converting file time to unix epoch*/
> 		tmpres -= DELTA_EPOCH_IN_MICROSECS;
>
> Please correct it.

Wow the comments even spell out the ordering is wrong... good catch 
thanks...

http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/commit/?id=47f5fa498338cce65b9f8e705001d6abf9fd3172

-Andy




More information about the Libwebsockets mailing list