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
#define TIMING_H
#ifndef OPENALPR_TIMING_H
#define OPENALPR_TIMING_H
#include <iostream>
#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>
#else
#include <sys/time.h>
#endif
@@ -17,13 +27,6 @@
#include <mach/mach.h>
#endif
// Support for Windows
#ifdef WINDOWS
#include <windows.h>
#define timespec timeval
#endif
namespace alpr
{