bool SessionTimer::process(AmEvent* ev) { AmTimeoutEvent* timeout_ev = dynamic_cast<AmTimeoutEvent*>(ev); if (timeout_ev) { DBG("received timeout Event with ID %d\n", timeout_ev->data.get(0).asInt()); onTimeoutEvent(timeout_ev); return true; } return false; }
PRL_RESULT Task_SyncVmsUptime::run_body() { quint32 nTimeout = CDspService::instance()->getDispConfigGuard().getDispWorkSpacePrefs()->getVmUptimeSyncTimeoutInMinutes(); if ( ! nTimeout ) { WRITE_TRACE(DBG_FATAL, "Synchronization up time task was not started due to timeout is zero !"); return (PRL_ERR_SUCCESS); } SmartPtr<QTimer> pTimer(new QTimer); bool bConnected = connect(pTimer.getImpl(), SIGNAL(timeout()), SLOT(onTimeoutEvent())); PRL_ASSERT(bConnected); pTimer->start(nTimeout*60*1000); exec(); return (PRL_ERR_SUCCESS); }