diff --git a/openbr/core/boost.cpp b/openbr/core/boost.cpp index 0f4e7fc..874f974 100644 --- a/openbr/core/boost.cpp +++ b/openbr/core/boost.cpp @@ -788,14 +788,17 @@ void CascadeBoostTrainData::precalculate() { int minNum = MIN( numPrecalcVal, numPrecalcIdx); - double proctime = -TIME( 0 ); + QTime time; + time.start(); + parallel_for_( Range(numPrecalcVal, numPrecalcIdx), FeatureIdxOnlyPrecalc(featureEvaluator, buf, sample_count, is_buf_16u!=0) ); parallel_for_( Range(0, minNum), FeatureValAndIdxPrecalc(featureEvaluator, buf, &valCache, sample_count, is_buf_16u!=0) ); parallel_for_( Range(minNum, numPrecalcVal), - FeatureValOnlyPrecalc(featureEvaluator, &valCache, sample_count) ); - cout << "Precalculation time: " << (proctime + TIME( 0 )) << endl; + FeatureValOnlyPrecalc(featureEvaluator, &valCache, sample_count) ); + + cout << "Precalculation time (ms): " << time.elapsed() << endl; } //-------------------------------- CascadeBoostTree ---------------------------------------- diff --git a/openbr/core/boost.h b/openbr/core/boost.h index 7a462a6..1b54e3a 100644 --- a/openbr/core/boost.h +++ b/openbr/core/boost.h @@ -4,12 +4,6 @@ #include "ml.h" #include -#ifdef _WIN32 -#define TIME( arg ) (((double) clock()) / CLOCKS_PER_SEC) -#else -#define TIME( arg ) (time( arg )) -#endif - namespace br {