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

41 lines
1.6 KiB
C
Raw Normal View History

2012-12-19 09:30:18 +00:00
/****************************************************************************
* *
2015-11-10 05:21:49 +00:00
* Project64 - A Nintendo 64 emulator. *
2012-12-19 09:30:18 +00:00
* 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
2015-12-06 09:59:58 +00:00
#include <Project64-core/N64System/N64Types.h>
2016-10-02 21:46:05 +00:00
#include <Common/HighResTimeStamp.h>
class CProfiling
{
public:
2015-12-23 19:51:37 +00:00
CProfiling();
2016-10-02 21:46:05 +00:00
void RecordTime(PROFILE_TIMERS timer, uint32_t time);
2016-10-04 19:58:11 +00:00
uint64_t NonCPUTime(void);
2016-10-02 21:46:05 +00:00
2015-12-23 19:51:37 +00:00
//recording timing against current timer, returns the address of the timer stopped
2016-10-02 21:46:05 +00:00
PROFILE_TIMERS StartTimer(PROFILE_TIMERS TimerType);
PROFILE_TIMERS StopTimer();
2015-12-23 19:51:37 +00:00
//Display the CPU Usage
void ShowCPU_Usage();
2016-10-02 21:46:05 +00:00
void ResetTimers(void);
private:
2015-12-23 19:51:37 +00:00
CProfiling(const CProfiling&); // Disable copy constructor
CProfiling& operator=(const CProfiling&); // Disable assignment
2015-12-23 19:51:37 +00:00
uint32_t m_CurrentDisplayCount;
2016-10-02 21:46:05 +00:00
PROFILE_TIMERS m_CurrentTimerType;
HighResTimeStamp m_StartTime;
uint64_t m_Timers[Timer_Max];
};