XnStatus xnOSTimeInit() { if (!g_xnOSInitialized) { xnOSStartHighResTimer(&g_xnOSHighResGlobalTimer); g_xnOSInitialized = true; } return XN_STATUS_OK; }
XnStatus XnDeviceFileWriter::StartTimer() { XnStatus nRetVal = XN_STATUS_OK; if (!m_bTimerStarted) { nRetVal = xnOSStartHighResTimer(&m_Timer); XN_IS_STATUS_OK(nRetVal); m_bTimerStarted = TRUE; } return (XN_STATUS_OK); }
//--------------------------------------------------------------------------- // Code //--------------------------------------------------------------------------- XN_C_API XnStatus xnOSInit() { // Local function variables XnStatus nRetVal = XN_STATUS_OK; // Was the O/S subsystem already initialized? if (g_xnOSWasInit == FALSE) { // Start the global high res timer nRetVal = xnOSStartHighResTimer(&g_xnOSHighResGlobalTimer); XN_IS_STATUS_OK(nRetVal); g_xnOSWasInit = TRUE; } else { // Trying to init twice... return (XN_STATUS_OS_ALREADY_INIT); } // All is good... return (XN_STATUS_OK); }