mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 06:16:56 +08:00
Rearranged timing.h for Windows
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user