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