Win32 implementation of pmutility.c:PMTimeout() was broken
Change-Id: I313fac3b7fc2437ad5de89baf03600a01516ed24
Signed-off-by: Daniel Ferguson <daniel.j.ferguson@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/8503
Reviewed-by: David Antler <david.a.antler@intel.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
#if defined(HAVE_GETSYSTEMTIMEASFILETIME)
FILETIME startTime = {0};
FILETIME currTime = {0};
- int clock_res = 1;
GetSystemTimeAsFileTime(&startTime);
#elif defined(HAVE_CLOCK_GETTIME)
# else
int clock_res = clock_gettime(CLOCK_REALTIME, &startTime);
# endif // defined(_POSIX_MONOTONIC_CLOCK)
+ if (0 != clock_res)
+ {
+ return OC_STACK_ERROR;
+ }
#else
ERROR Need PMTimeout implementation
return OC_STACK_ERROR;
#endif
- if (0 != clock_res)
- {
- return OC_STACK_ERROR;
- }
while (OC_STACK_OK == res)
{
#if defined(HAVE_GETSYSTEMTIMEASFILETIME)