diff --git a/modules/flann/include/opencv2/flann/timer.h b/modules/flann/include/opencv2/flann/timer.h index 107371ecd4..6428b0a0d7 100644 --- a/modules/flann/include/opencv2/flann/timer.h +++ b/modules/flann/include/opencv2/flann/timer.h @@ -32,7 +32,7 @@ #define OPENCV_FLANN_TIMER_H #include - +#include "opencv2/core/core.hpp" namespace cvflann { @@ -44,7 +44,7 @@ namespace cvflann */ class StartStopTimer { - clock_t startTime; + int64 startTime; public: /** @@ -66,7 +66,7 @@ public: */ void start() { - startTime = clock(); + startTime = cv::getTickCount(); } /** @@ -74,8 +74,8 @@ public: */ void stop() { - clock_t stopTime = clock(); - value += ( (double)stopTime - startTime) / CLOCKS_PER_SEC; + int64 stopTime = cv::getTickCount(); + value += ( (double)stopTime - startTime) / cv::getTickFrequency(); } /**