MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / xnProfilingShutdown

Function xnProfilingShutdown

Source/OpenNI/XnProfiling.cpp:173–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173XN_C_API XnStatus xnProfilingShutdown()
174{
175 if (g_ProfilingData.hThread != NULL)
176 {
177 g_ProfilingData.bKillThread = TRUE;
178 xnLogVerbose(XN_MASK_PROFILING, "Shutting down Profiling thread...");
179 xnOSWaitAndTerminateThread(&g_ProfilingData.hThread, g_ProfilingData.nProfilingInterval * 2);
180 g_ProfilingData.hThread = NULL;
181 }
182
183 if (g_ProfilingData.hCriticalSection != NULL)
184 {
185 xnOSCloseCriticalSection(&g_ProfilingData.hCriticalSection);
186 g_ProfilingData.hCriticalSection = NULL;
187 }
188
189 XN_FREE_AND_NULL(g_ProfilingData.aSections);
190
191 g_ProfilingData.bInitialized = FALSE;
192
193 return XN_STATUS_OK;
194}
195
196XN_C_API XnBool xnProfilingIsActive()
197{

Callers 1

xnProfilingInitFunction · 0.85

Calls 2

xnOSCloseCriticalSectionFunction · 0.50

Tested by

no test coverage detected