class cv::TickMeter

Overview

a Class to measure passing time. Moreā€¦

#include <utility.hpp>

class TickMeter
{
public:
    // methods

    int64
    getCounter() const;

    double
    getTimeMicro() const;

    double
    getTimeMilli() const;

    double
    getTimeSec() const;

    int64
    getTimeTicks() const;

    void
    reset();

    void
    start();

    void
    stop();
};

Detailed Documentation

a Class to measure passing time.

The class computes passing time by counting the number of ticks per second. That is, the following code computes the execution time in seconds:

TickMeter tm;
tm.start();
// do something ...
tm.stop();
std::cout << tm.getTimeSec();

See also:

getTickCount, getTickFrequency

Methods

int64
getCounter() const

returns internal counter value.

double
getTimeMicro() const

returns passed time in microseconds.

double
getTimeMilli() const

returns passed time in milliseconds.

double
getTimeSec() const

returns passed time in seconds.

int64
getTimeTicks() const

returns counted ticks.

void
reset()

resets internal values.

void
start()

starts counting ticks.

void
stop()

stops counting ticks.