From 29a040d49cb4e923b26df4a6e4e636bf56f23574 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Tue, 19 Aug 2014 00:42:40 -0400 Subject: [PATCH] Replaced usleep with platform independent sleep function --- src/main.cpp | 7 ++++--- src/openalpr/alpr_impl.cpp | 2 +- src/openalpr/alpr_impl.h | 1 + src/video/videobuffer.cpp | 6 +++--- src/video/videobuffer.h | 1 + 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 41923aa..dc1df28 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,6 +29,7 @@ #include "tclap/CmdLine.h" #include "support/filesystem.h" #include "support/timing.h" +#include "support/platform.h" #include "video/videobuffer.h" #include "alpr.h" @@ -154,7 +155,7 @@ int main( int argc, const char** argv ) while (cap.read(frame)) { detectandshow(&alpr, frame, "", outputJson); - usleep(1000); + sleep_ms(1000); framenum++; } } @@ -179,7 +180,7 @@ int main( int argc, const char** argv ) } // Sleep 10ms - usleep(10000); + sleep_ms(10000); } videoBuffer.disconnect(); @@ -207,7 +208,7 @@ int main( int argc, const char** argv ) detectandshow( &alpr, frame, "", outputJson); //create a 1ms delay - usleep(1000); + sleep_ms(1000); framenum++; } } diff --git a/src/openalpr/alpr_impl.cpp b/src/openalpr/alpr_impl.cpp index 1e5be05..25ecf3c 100644 --- a/src/openalpr/alpr_impl.cpp +++ b/src/openalpr/alpr_impl.cpp @@ -159,7 +159,7 @@ AlprFullDetails AlprImpl::recognizeFullDetails(cv::Mat img, std::vector