first commit
This commit is contained in:
42
include/framework/timing/loop_benchmark.h
Normal file
42
include/framework/timing/loop_benchmark.h
Normal file
@ -0,0 +1,42 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
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__
|
||||
Reference in New Issue
Block a user