- t = ((HsInt64)ft.dwHighDateTime << 32) | ft.dwLowDateTime;
- t = (t * TICKS_PER_SECOND) / 10000000LL;
- /* FILETIMES are in units of 100ns */
- return (HsInt)t;
+ t = ((HsWord64)ft.dwHighDateTime << 32) | ft.dwLowDateTime;
+ t = t / 10LL;
+ /* FILETIMES are in units of 100ns,
+ so we divide by 10 to get microseconds */
+ return t;