StopWatch.h Example File
multimedia/spectrum/3rdparty/fftreal/stopwatch/StopWatch.h
#if ! defined (stopwatch_StopWatch_HEADER_INCLUDED)
#define stopwatch_StopWatch_HEADER_INCLUDED
#if defined (_MSC_VER)
#pragma once
#pragma warning (4 : 4250) // "Inherits via dominance."
#endif
#include "ClockCycleCounter.h"
namespace stopwatch
{
class StopWatch
{
public:
StopWatch ();
stopwatch_FORCEINLINE void
start ();
stopwatch_FORCEINLINE void
stop_lap ();
double get_time_total (Int64 nbr_op) const;
double get_time_best_lap (Int64 nbr_op) const;
protected:
private:
ClockCycleCounter
_ccc;
Int64 _nbr_laps;
private:
StopWatch (const StopWatch &other);
StopWatch & operator = (const StopWatch &other);
bool operator == (const StopWatch &other);
bool operator != (const StopWatch &other);
};
}
#include "StopWatch.hpp"
#endif // stopwatch_StopWatch_HEADER_INCLUDED