Lines Matching refs:timerFd
86 int timerFd = once ? INVALID_TIMER_FD : GetTimerFd(interval); in Register() local
87 if (timerFd == INVALID_TIMER_FD) { in Register()
88 uint32_t ret = DoRegister([this](int fd) { this->OnTimer(fd); }, interval, once, timerFd); in Register()
106 entry->timerFd = timerFd; in Register()
131 reactor_->CancelTimer((*itor)->timerFd); in Unregister()
132 timers_.erase((*itor)->timerFd); in Unregister()
156 …_t Timer::DoRegister(const TimerListCallback& callback, uint32_t interval, bool once, int &timerFd) in DoRegister() argument
159 uint32_t ret = reactor_->ScheduleTimer(cb, interval, timerFd, once); in DoRegister()
160 if ((ret != TIMER_ERR_OK) || (timerFd < 0)) { in DoRegister()
161 UTILS_LOGE("ScheduleTimer failed!ret:%{public}d, timerFd:%{public}d", ret, timerFd); in DoRegister()
164 timers_[timerFd] = interval; in DoRegister()
177 void Timer::OnTimer(int timerFd) in OnTimer() argument
183 interval = timers_[timerFd]; in OnTimer()
189 if (ptr->timerFd != timerFd) { in OnTimer()
208 void Timer::DoTimerListCallback(const TimerListCallback& callback, int timerFd) in DoTimerListCallback() argument
210 callback(timerFd); in DoTimerListCallback()
233 return ptr->timerFd; in GetTimerFd()
250 reactor_->CancelTimer((*itor)->timerFd); in EraseUnusedTimerId()
251 timers_.erase((*itor)->timerFd); in EraseUnusedTimerId()