project64/Source/Project64-core/N64System/ProfilingClass.h

41 lines
1.6 KiB
C++

/****************************************************************************
* *
* Project64 - A Nintendo 64 emulator. *
* http://www.pj64-emu.com/ *
* Copyright (C) 2012 Project64. All rights reserved. *
* *
* License: *
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
* *
****************************************************************************/
#pragma once
#include <Project64-core/N64System/N64Types.h>
#include <Common/HighResTimeStamp.h>
class CProfiling
{
public:
CProfiling();
void RecordTime(PROFILE_TIMERS timer, uint32_t time);
uint64_t TimerTime(PROFILE_TIMERS timer);
//recording timing against current timer, returns the address of the timer stopped
PROFILE_TIMERS StartTimer(PROFILE_TIMERS TimerType);
PROFILE_TIMERS StopTimer();
//Display the CPU Usage
void ShowCPU_Usage();
void ResetTimers(void);
private:
CProfiling(const CProfiling&); // Disable copy constructor
CProfiling& operator=(const CProfiling&); // Disable assignment
uint32_t m_CurrentDisplayCount;
PROFILE_TIMERS m_CurrentTimerType;
HighResTimeStamp m_StartTime;
uint64_t m_Timers[Timer_Max];
};