fix win32helpers gettimeofday epoch
[platform/upstream/libwebsockets.git] / win32port / win32helpers / gettimeofday.c
index bdf8e16..18d5a46 100644 (file)
@@ -33,8 +33,8 @@ int gettimeofday(struct timeval *tv, struct timezone *tz)
                tmpres |= ft.dwLowDateTime;\r
 \r
                /*converting file time to unix epoch*/\r
-               tmpres -= DELTA_EPOCH_IN_MICROSECS; \r
                tmpres /= 10;  /*convert into microseconds*/\r
+               tmpres -= DELTA_EPOCH_IN_MICROSECS;
                tv->tv_sec = (long)(tmpres / 1000000UL);\r
                tv->tv_usec = (long)(tmpres % 1000000UL);\r
        }\r