21 #ifndef _XN_PROFILING_H_
22 #define _XN_PROFILING_H_
32 #define INVALID_PROFILING_HANDLE -1
95 #define _XN_PROFILING_START_SECTION(name, mt) \
97 static XnProfilingHandle __profiling = INVALID_PROFILING_HANDLE; \
98 if (xnProfilingIsActive()) \
100 xnProfilingSectionStart(name, mt, &__profiling); \
103 #define XN_PROFILING_START_SECTION(name) _XN_PROFILING_START_SECTION(name, FALSE)
104 #define XN_PROFILING_START_MT_SECTION(name) _XN_PROFILING_START_SECTION(name, TRUE)
109 #define XN_PROFILING_END_SECTION \
110 if (__profiling != INVALID_PROFILING_HANDLE) \
112 xnProfilingSectionEnd(&__profiling); \
123 #define XN_PROFILING_START_FUNCTION XN_PROFILING_START_SECTION(__FUNCTION__)
128 #define XN_PROFILING_END_FUNCTION XN_PROFILING_END_SECTION
130 #endif //_XN_PROFILING_H_
XN_C_API XnStatus XN_C_DECL xnProfilingInitFromINI(const XnChar *cpINIFileName, const XnChar *cpSectionName)
XnInt32 XnProfilingHandle
Definition: XnProfiling.h:37
XnUInt32 XnStatus
Definition: XnStatus.h:33
XN_C_API XnStatus XN_C_DECL xnProfilingInit(XnUInt32 nProfilingInterval=0)
XN_C_API XnStatus XN_C_DECL xnProfilingShutdown()
XN_C_API XnStatus XN_C_DECL xnProfilingSectionStart(const char *csSectionName, XnBool bMT, XnProfilingHandle *pHandle)
XN_C_API XnStatus XN_C_DECL xnProfilingSectionEnd(XnProfilingHandle *pHandle)
XN_C_API XnBool XN_C_DECL xnProfilingIsActive()