1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

T. Bharath fixed his mm lib timer resolution fix

This commit is contained in:
Daniel Stenberg 2002-06-26 06:47:18 +00:00
parent eb164098b7
commit 2443e1f38c

View File

@ -56,10 +56,14 @@ gettimeofday (struct timeval *tp, void *nothing)
** of 1ms.Need to link against winmm.lib for this
**/
unsigned long Ticks = 0;
unsigned long Sec =0;
unsigned long Usec = 0;
Ticks = timeGetTime();
tp->tv_sec = Ticks%1000;
tp->tv_usec = (Ticks - (tp->tv_sec*1000))*1000;
Sec = Ticks/1000;
Usec = (Ticks - (Sec*1000))*1000;
tp->tv_sec = Sec;
tp->tv_usec = Usec;
#endif
return 1;
}