}
#if defined(__ANDROID__) || _POSIX_TIMERS > 0
- #ifdef __ANDROID__
- if (camutex_condattr_setclock) {
+ #ifdef __ANDROID__
+ if (camutex_condattr_setclock)
+ {
ret = camutex_condattr_setclock(&(eventInfo->condattr), CLOCK_MONOTONIC);
- #else
+ #else
{
ret = pthread_condattr_setclock(&(eventInfo->condattr), CLOCK_MONOTONIC);
- #endif /* __ANDROID__ */
+ #endif /* __ANDROID__ */
if(0 != ret)
{
OIC_LOG_V(ERROR, TAG, "%s: Failed to set condition variable clock %d!",
struct timespec abstime;
#ifdef __ANDROID__
- if (camutex_cond_timedwait_relative) {
+ if (camutex_cond_timedwait_relative)
+ {
abstime.tv_sec = microseconds / USECS_PER_SEC;
abstime.tv_nsec = (microseconds % USECS_PER_SEC) * NANOSECS_PER_USECS;
//Wait for the given time