Merge pull request #2834 from atinfinity:pullreq/140606-TickMeter-2.4

This commit is contained in:
Roman Donchenko 2014-06-09 14:29:44 +04:00 committed by OpenCV Buildbot
commit 4ef311949b

View File

@ -1209,16 +1209,16 @@ private:
cv::TickMeter::TickMeter() { reset(); }
int64 cv::TickMeter::getTimeTicks() const { return sumTime; }
double cv::TickMeter::getTimeMicro() const { return (double)getTimeTicks()/cvGetTickFrequency(); }
double cv::TickMeter::getTimeMilli() const { return getTimeMicro()*1e-3; }
double cv::TickMeter::getTimeSec() const { return getTimeMilli()*1e-3; }
double cv::TickMeter::getTimeSec() const { return (double)getTimeTicks()/getTickFrequency(); }
double cv::TickMeter::getTimeMilli() const { return getTimeSec()*1e3; }
double cv::TickMeter::getTimeMicro() const { return getTimeMilli()*1e3; }
int64 cv::TickMeter::getCounter() const { return counter; }
void cv::TickMeter::reset() {startTime = 0; sumTime = 0; counter = 0; }
void cv::TickMeter::start(){ startTime = cvGetTickCount(); }
void cv::TickMeter::start(){ startTime = getTickCount(); }
void cv::TickMeter::stop()
{
int64 time = cvGetTickCount();
int64 time = getTickCount();
if ( startTime == 0 )
return;