fix win32helpers gettimeofday epoch

Signed-off-by: Arokux B <arokux@gmail.com>
This commit is contained in:
Arokux B 2013-03-05 08:41:47 +08:00 committed by Andy Green
parent 1bc12f9e99
commit 47f5fa4983

View file

@ -33,8 +33,8 @@ int gettimeofday(struct timeval *tv, struct timezone *tz)
tmpres |= ft.dwLowDateTime;
/*converting file time to unix epoch*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);
tv->tv_usec = (long)(tmpres % 1000000UL);
}