Fix compile failures on tor_gettimeofday() fix for windows

svn:r4685
This commit is contained in:
Nick Mathewson 2005-08-03 17:16:48 +00:00
parent 41e48519d0
commit 98f1265309

View File

@ -838,8 +838,8 @@ tor_gettimeofday(struct timeval *timeval)
exit(1); exit(1);
} }
ft.ft_64 -= EPOCH_BIAS; ft.ft_64 -= EPOCH_BIAS;
tv->tv_sec = ft.ft_64 / UNITS_PER_SEC; timeval->tv_sec = (unsigned) (ft.ft_64 / UNITS_PER_SEC);
tv->tv_usec = (ft.ft_64 / UNITS_PER_USEC) % USEC_PER_SEC; timeval->tv_usec = (unsigned) ((ft.ft_64 / UNITS_PER_USEC) % USEC_PER_SEC);
#elif defined(HAVE_GETTIMEOFDAY) #elif defined(HAVE_GETTIMEOFDAY)
if (gettimeofday(timeval, NULL)) { if (gettimeofday(timeval, NULL)) {
log_fn(LOG_ERR, "gettimeofday failed."); log_fn(LOG_ERR, "gettimeofday failed.");