= std::unique_ptr<std::list<BrokerRequesterInfoPtr>>
(new std::list<BrokerRequesterInfoPtr>);
- timeoutHandle = expiryTimer.requestTimer(SAFE_TIME, pTimeoutCB);
+ timeoutHandle = expiryTimer.postTimer(SAFE_MILLISECOND, pTimeoutCB);
primitiveResource->requestGet(pGetCB);
currentTime += 0L;
if((receivedTime.load(std::memory_order_relaxed) == 0) ||
- ((receivedTime + SAFE_TIME) > currentTime ))
+ ((receivedTime + SAFE_SECOND) > currentTime ))
{
+ this->isWithinTime = false;
+ isTimeoutCB = false;
+ cbCondition.notify_all();
+
return NULL;
}
this->isWithinTime = false;
void * ResourcePresence::pollingCB(unsigned int msg)
{
+ OC_LOG_V(DEBUG,BROKER_TAG,"IN PollingCB\n");
this->requestResourceState();
- timeoutHandle = expiryTimer.requestTimer(SAFE_TIME,pTimeoutCB);
+ timeoutHandle = expiryTimer.postTimer(SAFE_MILLISECOND,pTimeoutCB);
return NULL;
}
if(mode == BROKER_MODE::NON_PRESENCE_MODE)
{
// TODO set timer & request get
- expiryTimer.requestTimer(SAFE_TIME,pPollingCB);
+ expiryTimer.postTimer(SAFE_MILLISECOND,pPollingCB);
}
}