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

Function xnOSInit

Source/OpenNI/XnOS.cpp:35–57  ·  view source on GitHub ↗

--------------------------------------------------------------------------- Code ---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

33// Code
34//---------------------------------------------------------------------------
35XN_C_API XnStatus xnOSInit()
36{
37 // Local function variables
38 XnStatus nRetVal = XN_STATUS_OK;
39
40 // Was the O/S subsystem already initialized?
41 if (g_xnOSWasInit == FALSE)
42 {
43 // Start the global high res timer
44 nRetVal = xnOSStartHighResTimer(&g_xnOSHighResGlobalTimer);
45 XN_IS_STATUS_OK(nRetVal);
46
47 g_xnOSWasInit = TRUE;
48 }
49 else
50 {
51 // Trying to init twice...
52 return (XN_STATUS_OS_ALREADY_INIT);
53 }
54
55 // All is good...
56 return (XN_STATUS_OK);
57}
58
59XN_C_API XnStatus xnOSShutdown()
60{

Callers 3

xnFPSInitFunction · 0.85
xnLogInitSystemFunction · 0.85
xnInitFunction · 0.85

Calls 1

xnOSStartHighResTimerFunction · 0.50

Tested by

no test coverage detected