30 lines
569 B
C++
30 lines
569 B
C++
#ifndef ITF_EXTERN_PROFILER_PS3_H
|
|
#define ITF_EXTERN_PROFILER_PS3_H
|
|
|
|
#include <libsntuner.h>
|
|
|
|
namespace Ext
|
|
{
|
|
class PS3ScopedProfiler
|
|
{
|
|
public:
|
|
PS3ScopedProfiler( const char* text )
|
|
{
|
|
m_errorCode = snPushMarker(text);
|
|
}
|
|
~PS3ScopedProfiler()
|
|
{
|
|
if (m_errorCode == 0)
|
|
{
|
|
snPopMarker();
|
|
}
|
|
}
|
|
|
|
private:
|
|
int m_errorCode;
|
|
};
|
|
}
|
|
|
|
#define PROFILER_SCOPED_EVENT(__name) Ext::PS3ScopedProfiler(__name)
|
|
|
|
#endif // ITF_EXTERN_PROFILER_PS3_H
|