Added timing fixes for Visual Studio 2015

This commit is contained in:
Matt Hill
2015-08-12 23:46:37 -04:00
parent bd95aa0ae1
commit a63bd87bcb
2 changed files with 16 additions and 14 deletions

View File

@@ -5,18 +5,20 @@
#include <ctime>
#include <stdint.h>
#if WINDOWS
struct timespec
{
time_t tv_sec; // Seconds - >= 0
long tv_usec; // Nanoseconds - [0, 999999999]
};
#endif
#ifdef WINDOWS
// Import windows only stuff
#include <windows.h>
#if _MSC_VER < 1900
struct timespec
{
time_t tv_sec; // Seconds - >= 0
long tv_nsec; // Nanoseconds - [0, 999999999]
};
#else
//#define timespec timeval
#endif
#else
#include <sys/time.h>
#endif