mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-08-01 02:15:54 -04:00
Initial commits of the sharedDebug and sharedMemoryManager projects
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
//=================================================================== //
|
||||
//
|
||||
// PerformanceTimer.h
|
||||
// copyright 2000-2004 Sony Online Entertainment
|
||||
// All Rights Reserved
|
||||
//
|
||||
//===================================================================
|
||||
|
||||
#ifndef INCLUDED_PerformaceTimer_H
|
||||
#define INCLUDED_PerformaceTimer_H
|
||||
|
||||
//===================================================================
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
//===================================================================
|
||||
|
||||
class PerformanceTimer
|
||||
{
|
||||
public:
|
||||
|
||||
static void install();
|
||||
|
||||
public:
|
||||
|
||||
PerformanceTimer();
|
||||
~PerformanceTimer();
|
||||
|
||||
void start();
|
||||
void resume();
|
||||
void stop();
|
||||
|
||||
float getElapsedTime() const;
|
||||
float getSplitTime() const;
|
||||
void logElapsedTime(const char* string) const;
|
||||
|
||||
private:
|
||||
|
||||
timeval startTime;
|
||||
timeval stopTime;
|
||||
|
||||
private:
|
||||
|
||||
PerformanceTimer(PerformanceTimer const &);
|
||||
PerformanceTimer & operator=(PerformanceTimer const &);
|
||||
};
|
||||
|
||||
//===================================================================
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user