|
|
@ -301,6 +301,9 @@ DECLARE_CV_CPUID_X86 |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined CV_CXX11 |
|
|
|
|
|
|
|
#include <chrono> |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
namespace cv |
|
|
|
namespace cv |
|
|
|
{ |
|
|
|
{ |
|
|
@ -859,7 +862,10 @@ bool useOptimized(void) |
|
|
|
|
|
|
|
|
|
|
|
int64 getTickCount(void) |
|
|
|
int64 getTickCount(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#if defined _WIN32 || defined WINCE |
|
|
|
#if defined CV_CXX11 |
|
|
|
|
|
|
|
std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now(); |
|
|
|
|
|
|
|
return (int64)now.time_since_epoch().count(); |
|
|
|
|
|
|
|
#elif defined _WIN32 || defined WINCE |
|
|
|
LARGE_INTEGER counter; |
|
|
|
LARGE_INTEGER counter; |
|
|
|
QueryPerformanceCounter( &counter ); |
|
|
|
QueryPerformanceCounter( &counter ); |
|
|
|
return (int64)counter.QuadPart; |
|
|
|
return (int64)counter.QuadPart; |
|
|
@ -878,7 +884,11 @@ int64 getTickCount(void) |
|
|
|
|
|
|
|
|
|
|
|
double getTickFrequency(void) |
|
|
|
double getTickFrequency(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#if defined _WIN32 || defined WINCE |
|
|
|
#if defined CV_CXX11 |
|
|
|
|
|
|
|
using clock_period_t = std::chrono::steady_clock::duration::period; |
|
|
|
|
|
|
|
double clock_freq = clock_period_t::den / clock_period_t::num; |
|
|
|
|
|
|
|
return clock_freq; |
|
|
|
|
|
|
|
#elif defined _WIN32 || defined WINCE |
|
|
|
LARGE_INTEGER freq; |
|
|
|
LARGE_INTEGER freq; |
|
|
|
QueryPerformanceFrequency(&freq); |
|
|
|
QueryPerformanceFrequency(&freq); |
|
|
|
return (double)freq.QuadPart; |
|
|
|
return (double)freq.QuadPart; |
|
|
|