class mrpt::system::CTicTac

A high-performance stopwatch, with typical resolution of nanoseconds.

This always uses the system MONOTONIC clock, despite the setting in mrpt::Clock.

The class is named after the Spanish equivalent of “Tic-Toc” ;-)

#include <mrpt/system/CTicTac.h>

class CTicTac
{
public:
    // construction

    CTicTac();

    //
methods

    void Tic();
    double Tac() const;
};

Construction

CTicTac()

Default constructor.

Implicitly calls Tic()

Methods

void Tic()

Starts the stopwatch.

See also:

Tac()

double Tac() const

Stops the stopwatch.

Returns:

Returns the ellapsed time in seconds.

See also:

Tic()