static uint64_t filetime_to_unix_epoch (const FILETIME *ft)
{
uint64_t res = (uint64_t) ft->dwHighDateTime << 32;
-
+
res |= ft->dwLowDateTime;
res /= 10; /* from 100 nano-sec periods to usec */
res -= DELTA_EPOCH_IN_USEC; /* from Win epoch to Unix epoch */
{
FILETIME ft;
uint64_t tim;
-
+
if (!tv) {
errno = EINVAL;
return (-1);