summaryrefslogtreecommitdiff
path: root/os/windows/posix.c
diff options
context:
space:
mode:
authorVincent Fu <Vincent.Fu@sandisk.com>2017-03-14 14:41:26 -0400
committerVincent Fu <vincent.fu@sandisk.com>2017-06-21 10:41:21 -0400
commit8b6a404cdd2c40715885e562416c3db039912773 (patch)
tree4f869d7ee45cc94ce54ba8682ff086825d5175df /os/windows/posix.c
parentb2fcbe01bdac01bc5d7f8ddea94f264b9f8c2003 (diff)
downloadfio-8b6a404cdd2c40715885e562416c3db039912773.tar.gz
fio-8b6a404cdd2c40715885e562416c3db039912773.tar.bz2
nanosecond: initial commit changing timeval to timespec
struct timeval has usec resolution whereas struct timespec has nsec resolution. This commit changes several dozen instances of struct timeval to struct timespec. All of the output is unchanged. The ticks to nsec conversion in this patch is broken but fixed in a later patch.
Diffstat (limited to 'os/windows/posix.c')
-rwxr-xr-xos/windows/posix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/os/windows/posix.c b/os/windows/posix.c
index eae8c861..488d0ed2 100755
--- a/os/windows/posix.c
+++ b/os/windows/posix.c
@@ -25,8 +25,8 @@
#include "../os-windows.h"
#include "../../lib/hweight.h"
-extern unsigned long mtime_since_now(struct timeval *);
-extern void fio_gettime(struct timeval *, void *);
+extern unsigned long mtime_since_now(struct timespec *);
+extern void fio_gettime(struct timespec *, void *);
/* These aren't defined in the MinGW headers */
HRESULT WINAPI StringCchCopyA(
@@ -852,7 +852,7 @@ int poll(struct pollfd fds[], nfds_t nfds, int timeout)
int nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
{
- struct timeval tv;
+ struct timespec tv;
DWORD ms_remaining;
DWORD ms_total = (rqtp->tv_sec * 1000) + (rqtp->tv_nsec / 1000000.0);