ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev_win32.c
(Generate patch)

Comparing libev/ev_win32.c (file contents):
Revision 1.17 by root, Sat Oct 17 21:47:56 2015 UTC vs.
Revision 1.20 by root, Thu Jul 11 08:22:54 2019 UTC

86 goto fail; 86 goto fail;
87 87
88 if (connect (sock [0], (struct sockaddr *)&addr, addr_size)) 88 if (connect (sock [0], (struct sockaddr *)&addr, addr_size))
89 goto fail; 89 goto fail;
90 90
91 /* TODO: returns INVALID_SOCKET on winsock accept, not < 0. fix it */
92 /* when convenient, probably by just removing error checking altogether? */
91 if ((sock [1] = accept (listener, 0, 0)) < 0) 93 if ((sock [1] = accept (listener, 0, 0)) < 0)
92 goto fail; 94 goto fail;
93 95
94 /* windows vista returns fantasy port numbers for sockets: 96 /* windows vista returns fantasy port numbers for sockets:
95 * example for two interconnected tcp sockets: 97 * example for two interconnected tcp sockets:
150 152
151 GetSystemTimeAsFileTime (&ft); 153 GetSystemTimeAsFileTime (&ft);
152 ui.u.LowPart = ft.dwLowDateTime; 154 ui.u.LowPart = ft.dwLowDateTime;
153 ui.u.HighPart = ft.dwHighDateTime; 155 ui.u.HighPart = ft.dwHighDateTime;
154 156
155 /* msvc cannot convert ulonglong to double... yes, it is that sucky */ 157 /* also, msvc cannot convert ulonglong to double... yes, it is that sucky */
156 return (LONGLONG)(ui.QuadPart - 116444736000000000) * 1e-7; 158 return EV_TS_FROM_USEC (((LONGLONG)(ui.QuadPart - 116444736000000000) * 1e-1))
157} 159}
158 160
159#endif 161#endif
160 162

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines