From fed3622bf3846bfbf716cce00028b1c5a6e16c16 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Wed, 12 Aug 2015 23:26:32 -0400 Subject: [PATCH] Rearranged timing.h for Windows --- src/openalpr/support/timing.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/openalpr/support/timing.h b/src/openalpr/support/timing.h index 9a022e6..13b8761 100644 --- a/src/openalpr/support/timing.h +++ b/src/openalpr/support/timing.h @@ -1,12 +1,22 @@ -#ifndef TIMING_H -#define TIMING_H +#ifndef OPENALPR_TIMING_H +#define OPENALPR_TIMING_H #include #include #include +#if WINDOWS +struct timespec +{ + time_t tv_sec; // Seconds - >= 0 + long tv_usec; // Nanoseconds - [0, 999999999] +}; +#endif + #ifdef WINDOWS // Import windows only stuff + #include + #else #include #endif @@ -17,13 +27,6 @@ #include #endif -// Support for Windows -#ifdef WINDOWS -#include - -#define timespec timeval -#endif - namespace alpr {