23 lines
497 B
C++
23 lines
497 B
C++
#ifndef ITF_EXTERN_PROFILER_DURANGO_H
|
|
#define ITF_EXTERN_PROFILER_DURANGO_H
|
|
|
|
#if !defined(PROFILE)
|
|
# define PROFILE
|
|
#endif
|
|
#include <Windows.h>
|
|
#include <pix.h>
|
|
|
|
namespace Ext
|
|
{
|
|
class PIXScopedProfiler
|
|
{
|
|
public:
|
|
PIXScopedProfiler( const wchar_t* text ) { PIXBeginEvent( 0, text ); }
|
|
~PIXScopedProfiler() { PIXEndEvent(); }
|
|
};
|
|
}
|
|
|
|
|
|
#define PROFILER_SCOPED_EVENT(__name) Ext::PIXScopedProfiler evt##__LINE__(L##__name)
|
|
|
|
#endif // ITF_EXTERN_PROFILER_DURANGO_H
|