diff options
Diffstat (limited to 'pjlib/src/pj/os_timestamp_win32.c')
-rw-r--r-- | pjlib/src/pj/os_timestamp_win32.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pjlib/src/pj/os_timestamp_win32.c b/pjlib/src/pj/os_timestamp_win32.c index 5b63529b..7cd391e3 100644 --- a/pjlib/src/pj/os_timestamp_win32.c +++ b/pjlib/src/pj/os_timestamp_win32.c @@ -24,6 +24,7 @@ defined(PJ_M_I386) && PJ_M_I386 != 0 && \ defined(PJ_HAS_PENTIUM) && PJ_HAS_PENTIUM!=0 && \ defined(_MSC_VER) + /* * Use rdtsc to get the OS timestamp. */ @@ -36,9 +37,16 @@ static pj_status_t GetCpuHz(void) LONG rc; DWORD size; +#if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0 + rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, + L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", + 0, 0, &key); +#else rc = RegOpenKey( HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", &key); +#endif + if (rc != ERROR_SUCCESS) return PJ_RETURN_OS_ERROR(rc); |