From 168af40fe9a3cc81c6ee16b3e81f154780c36bdb Mon Sep 17 00:00:00 2001 From: Scheaven <xuepengqiang> Date: 星期四, 03 六月 2021 15:03:27 +0800 Subject: [PATCH] up new v4 --- lib/detecter_tools/darknet/gettimeofday.h | 76 +++++++++++++++++++------------------- 1 files changed, 38 insertions(+), 38 deletions(-) diff --git a/lib/detecter_tools/darknet/gettimeofday.h b/lib/detecter_tools/darknet/gettimeofday.h index 94772d8..86fef10 100644 --- a/lib/detecter_tools/darknet/gettimeofday.h +++ b/lib/detecter_tools/darknet/gettimeofday.h @@ -1,38 +1,38 @@ -#ifdef _MSC_VER -#define WIN32_LEAN_AND_MEAN -#include <windows.h> -#include <winsock2.h> -#include <stdint.h> -#include <time.h> -#include "darknet.h" - -#define CLOCK_REALTIME (1) -#define BILLION (1E9) - -#ifndef timersub -#define timersub(a, b, result) \ - do { \ - (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ - (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ - if ((result)->tv_usec < 0) { \ - --(result)->tv_sec; \ - (result)->tv_usec += 1000000; \ - } \ - } while (0) -#endif // timersub - -#ifdef __cplusplus -extern "C" { -#endif - -static unsigned char g_first_time = 1; -static LARGE_INTEGER g_counts_per_sec; - -int gettimeofday(struct timeval*, struct timezone*); -int clock_gettime(int, struct timespec*); - -#ifdef __cplusplus -} -#endif - -#endif +#ifdef _MSC_VER +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#include <winsock2.h> +#include <stdint.h> +#include <time.h> +#include "darknet.h" + +#define CLOCK_REALTIME (1) +#define BILLION (1E9) + +#ifndef timersub +#define timersub(a, b, result) \ + do { \ + (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ + (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ + if ((result)->tv_usec < 0) { \ + --(result)->tv_sec; \ + (result)->tv_usec += 1000000; \ + } \ + } while (0) +#endif // timersub + +#ifdef __cplusplus +extern "C" { +#endif + +static unsigned char g_first_time = 1; +static LARGE_INTEGER g_counts_per_sec; + +int gettimeofday(struct timeval*, struct timezone*); +int clock_gettime(int, struct timespec*); + +#ifdef __cplusplus +} +#endif + +#endif -- Gitblit v1.8.0