2012-12-19 09:30:18 +00:00
|
|
|
#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>
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2015-04-28 22:19:02 +00:00
|
|
|
class CProfiling
|
2012-10-05 09:18:02 +00:00
|
|
|
{
|
2015-04-28 22:19:02 +00:00
|
|
|
public:
|
2015-12-23 19:51:37 +00:00
|
|
|
CProfiling();
|
2008-09-18 03:15:49 +00:00
|
|
|
|
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
|
|
|
|
2021-05-18 11:51:36 +00:00
|
|
|
// Recording timing against the 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();
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2021-05-18 11:51:36 +00:00
|
|
|
// Display the CPU usage
|
2015-12-23 19:51:37 +00:00
|
|
|
void ShowCPU_Usage();
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2016-10-02 21:46:05 +00:00
|
|
|
void ResetTimers(void);
|
2012-10-05 09:18:02 +00:00
|
|
|
|
|
|
|
private:
|
2021-04-13 00:07:11 +00:00
|
|
|
CProfiling(const CProfiling&);
|
|
|
|
CProfiling& operator=(const CProfiling&);
|
2012-10-05 09:18:02 +00:00
|
|
|
|
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];
|
2008-09-18 03:15:49 +00:00
|
|
|
};
|