diff --git a/src/switch_profile.c b/src/switch_profile.c index 056511e763..7e4e9e532b 100644 --- a/src/switch_profile.c +++ b/src/switch_profile.c @@ -43,7 +43,8 @@ #include #include #else -#define _WIN32_WINNT 0x0501 // To make GetSystemTimes visible in windows.h +/*already defined +#define _WIN32_WINNT 0x0501 // To make GetSystemTimes visible in windows.h*/ #include #endif @@ -201,16 +202,17 @@ SWITCH_DECLARE(int) switch_get_system_idle_time(switch_profile_timer_t *p, doubl FILETIME idleTime; FILETIME kernelTime; FILETIME userTime; + __int64 i64UserTime, i64KernelTime, i64IdleTime; - if (!::GetSystemTimes(&idleTime, &kernelTime, &userTime)) { - return false; + if (!GetSystemTimes(&idleTime, &kernelTime, &userTime)) { + return SWITCH_FALSE; } - __int64 i64UserTime = (__int64)userTime.dwLowDateTime | ((__int64)userTime.dwHighDateTime << 32); + i64UserTime = (__int64)userTime.dwLowDateTime | ((__int64)userTime.dwHighDateTime << 32); - __int64 i64KernelTime = (__int64)kernelTime.dwLowDateTime | ((__int64)kernelTime.dwHighDateTime << 32); + i64KernelTime = (__int64)kernelTime.dwLowDateTime | ((__int64)kernelTime.dwHighDateTime << 32); - __int64 i64IdleTime = (__int64)idleTime.dwLowDateTime | ((__int64)idleTime.dwHighDateTime << 32); + i64IdleTime = (__int64)idleTime.dwLowDateTime | ((__int64)idleTime.dwHighDateTime << 32); if (p->valid_last_times) { __int64 i64User = i64UserTime - p->i64LastUserTime; diff --git a/w32/Library/FreeSwitchCore.2008.vcproj b/w32/Library/FreeSwitchCore.2008.vcproj index 1db126677e..4bd5eb7ea5 100644 --- a/w32/Library/FreeSwitchCore.2008.vcproj +++ b/w32/Library/FreeSwitchCore.2008.vcproj @@ -798,6 +798,10 @@ RelativePath="..\..\src\switch_pcm.c" > + +