//------------------------------------------------------------ bool CTimerManager::listEvents(CTimerEventMap &Events) { if(!&Events) return false; Events.clear(); if(getInstance()->events.size() > 0) { CTimerEventMap::iterator pos = getInstance()->events.begin(); for(int i = 0;pos != getInstance()->events.end();pos++,i++) Events[pos->second->eventID] = pos->second; return true; } else return false; }
//------------------------------------------------------------ bool CTimerManager::listEvents(CTimerEventMap &Events) { if(!&Events) return false; pthread_mutex_lock(&tm_eventsMutex); Events.clear(); for (CTimerEventMap::iterator pos = events.begin(); pos != events.end(); ++pos) { pos->second->Refresh(); Events[pos->second->eventID] = pos->second; } pthread_mutex_unlock(&tm_eventsMutex); return true; }