Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions contrib/win32/win32compat/inc/sys/time.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#pragma once
#include <sys\utime.h>

#define utimbuf _utimbuf
#define utimes w32_utimes

#define timeval w32_timeval
struct timeval
{
long long tv_sec;
long tv_usec;
};

int usleep(unsigned int);
int gettimeofday(struct timeval *, void *);
int nanosleep(const struct timespec *, struct timespec *);
Expand Down
2 changes: 1 addition & 1 deletion contrib/win32/win32compat/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ gettimeofday(struct timeval *tv, void *tz)
us = (timehelper.ns - EPOCH_DELTA) / 10;

/* Stuff result into the timeval */
tv->tv_sec = (long)(us / USEC_IN_SEC);
tv->tv_sec = (long long)(us / USEC_IN_SEC);
tv->tv_usec = (long)(us % USEC_IN_SEC);

return 0;
Expand Down