Files
Webcam/include/framework/timing/loop_benchmark.h
2026-06-22 11:49:35 +02:00

43 lines
684 B
C++

/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __NLOOPBENCHMARK__
#define __NLOOPBENCHMARK__
#include "time/ntime.h"
namespace GS {
/*!
@short Loop benchmark tool.
@author Emmanuel Julien (ejulien@gsworks.fr)
*/
class LoopBenchmark
{
uint loop_count;
Time r_time, t_time;
float ms;
public:
void MarkLoop();
float GetMs() const;
float GetFps() const;
void Reset();
LoopBenchmark() : loop_count(0), ms(0) {}
};
} // GS
#endif // __NLOOPBENCHMARK__