mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 18:32:45 +08:00
Merge branch 'master' of github.com:vebers/openalpr into develop
This commit is contained in:
@@ -212,6 +212,7 @@
|
|||||||
# pragma warning (disable: 4127 4503 4702 4786)
|
# pragma warning (disable: 4127 4503 4702 4786)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@@ -1,5 +1,10 @@
|
|||||||
#include "timing.h"
|
#include "timing.h"
|
||||||
|
|
||||||
|
#ifdef __MACH__
|
||||||
|
#include <mach/clock.h>
|
||||||
|
#include <mach/mach.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
|
|
||||||
|
|
||||||
@@ -28,7 +33,19 @@ timespec diff(timespec start, timespec end);
|
|||||||
|
|
||||||
void getTime(timespec* time)
|
void getTime(timespec* time)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
|
||||||
|
clock_serv_t cclock;
|
||||||
|
mach_timespec_t mts;
|
||||||
|
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
|
||||||
|
clock_get_time(cclock, &mts);
|
||||||
|
mach_port_deallocate(mach_task_self(), cclock);
|
||||||
|
time->tv_sec = mts.tv_sec;
|
||||||
|
time->tv_nsec = mts.tv_nsec;
|
||||||
|
#else
|
||||||
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, time);
|
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, time);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
double diffclock(timespec time1,timespec time2)
|
double diffclock(timespec time1,timespec time2)
|
||||||
{
|
{
|
||||||
|
@@ -22,7 +22,9 @@
|
|||||||
|
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
|
|
||||||
#include <omp.h>
|
#ifndef __APPLE__ // CLang++ does not have yet implementet OpenMP
|
||||||
|
#include <omp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
Rect expandRect(Rect original, int expandXPixels, int expandYPixels, int maxX, int maxY)
|
Rect expandRect(Rect original, int expandXPixels, int expandYPixels, int maxX, int maxY)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user