Index: cifxdrv/os_intime.c =================================================================== --- cifxdrv/os_intime.c (revision 5578) +++ cifxdrv/os_intime.c (working copy) @@ -21,6 +21,7 @@ Version Date Author Description ---------------------------------------------------------------------------------- + 2 18.07.2013 SS cifX API routines may return before timeout elapsed 1 01.11.2011 CE/SS initial version **************************************************************************************/ @@ -47,13 +48,7 @@ BYTE area[KN_SEMAPHORE_SIZE]; } CRITICAL_SECTION, * LPCRITICAL_SECTION; -static QWORD _get_tsc(void) -{ - __asm rdtsc; -} - static SYSINFO s_tSysInfo = {0}; -static QWORD s_qwStartTime = 0; /*****************************************************************************/ /*! Calculates seconds to kernelticks @@ -213,12 +208,7 @@ /*****************************************************************************/ uint32_t OS_GetMilliSecCounter(void) { - QWORD qwNow; - DWORD dwMs; - - qwNow = _get_tsc(); - dwMs = (DWORD)((qwNow - s_qwStartTime) / s_tSysInfo.PentiumTicksPerUsec) / 1000; - return dwMs; + return (uint32_t)((knGetKernelTime(NULL) * 10) / s_tSysInfo.KernelTickRatio); } /*****************************************************************************/ @@ -508,7 +498,6 @@ int32_t OS_Init(void) { CopyRtSystemInfo(&s_tSysInfo); - s_qwStartTime = _get_tsc(); return 0; }