|
|
|
@ -596,12 +596,12 @@ void CPhoneDevice::handleTimerImpl(CPhoneDevice::TIMER_CONTEXT* context)
|
|
|
|
|
{
|
|
|
|
|
if (m_listener != NULL)
|
|
|
|
|
{
|
|
|
|
|
m_listener->OnTimeout(context->uid, context->timerType, context->times);
|
|
|
|
|
m_listener->OnTimeout(context->uid, context->timerType, context->data, context->times);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IDevice::timer_uid_t CPhoneDevice::RegisterTimer(unsigned int timerType, unsigned int timeout, unsigned long times/* = 0*/)
|
|
|
|
|
IDevice::timer_uid_t CPhoneDevice::RegisterTimer(unsigned int timerType, unsigned int timeout, void* data, unsigned long times/* = 0*/)
|
|
|
|
|
{
|
|
|
|
|
struct sigevent evp = { 0 };
|
|
|
|
|
struct itimerspec ts = { 0 };
|
|
|
|
@ -610,6 +610,7 @@ IDevice::timer_uid_t CPhoneDevice::RegisterTimer(unsigned int timerType, unsigne
|
|
|
|
|
|
|
|
|
|
TIMER_CONTEXT* context = new TIMER_CONTEXT();
|
|
|
|
|
context->device = this;
|
|
|
|
|
context->data = data;
|
|
|
|
|
context->timerType = timerType;
|
|
|
|
|
context->expectedTimes = times;
|
|
|
|
|
|
|
|
|
|