Struct ChronometerModel

Synopsis

#include <include/internal/benchmark/catch_chronometer.hpp>

template <typename Clock>
struct ChronometerModel final : public ChronometerConcept

Description

No description yet.

Inheritance

Ancestors: ChronometerConcept

Methods

elapsed
finish
start

Source

Lines 27-36 in include/internal/benchmark/catch_chronometer.hpp.

template <typename Clock>
struct ChronometerModel final : public ChronometerConcept {
    void start() override { started = Clock::now(); }
    void finish() override { finished = Clock::now(); }
    ClockDuration<Clock> elapsed() const { return finished - started; }
    TimePoint<Clock> started;
    TimePoint<Clock> finished;
};





Add Discussion as Guest

Log in