Rearranged timing.h for Windows

This commit is contained in:
Matt Hill
2015-08-12 23:26:32 -04:00
parent 459dbb2266
commit fed3622bf3

View File

@@ -1,12 +1,22 @@
#ifndef TIMING_H #ifndef OPENALPR_TIMING_H
#define TIMING_H #define OPENALPR_TIMING_H
#include <iostream> #include <iostream>
#include <ctime> #include <ctime>
#include <stdint.h> #include <stdint.h>
#if WINDOWS
struct timespec
{
time_t tv_sec; // Seconds - >= 0
long tv_usec; // Nanoseconds - [0, 999999999]
};
#endif
#ifdef WINDOWS #ifdef WINDOWS
// Import windows only stuff // Import windows only stuff
#include <windows.h>
#else #else
#include <sys/time.h> #include <sys/time.h>
#endif #endif
@@ -17,13 +27,6 @@
#include <mach/mach.h> #include <mach/mach.h>
#endif #endif
// Support for Windows
#ifdef WINDOWS
#include <windows.h>
#define timespec timeval
#endif
namespace alpr namespace alpr
{ {