/commonlibrary/c_utils/base/src/ |
H A D | timer.cpp | 85 static std::atomic_uint32_t timerId = 1; in Register() local 95 timerId = GetValidId(timerId); in Register() 96 while (timerToEntries_.find(timerId) != timerToEntries_.end()) { in Register() 97 timerId++; in Register() 98 timerId = GetValidId(timerId); in Register() 102 entry->timerId = timerId++; in Register() 109 timerToEntries_[entry->timerId] in Register() 115 Unregister(uint32_t timerId) Unregister() argument [all...] |
/commonlibrary/utils_lite/kal/timer/src/ |
H A D | kal.c | 78 KalErrCode KalTimerStart(KalTimerId timerId)
in KalTimerStart() argument 80 if (timerId == NULL) {
in KalTimerStart() 84 KalTimer* tmpPtr = (KalTimer *)timerId;
in KalTimerStart() 99 KalErrCode KalTimerChange(KalTimerId timerId, unsigned int millisec)
in KalTimerChange() argument 101 if (timerId == NULL) {
in KalTimerChange() 104 KalTimer* tmpPtr = (KalTimer *)timerId;
in KalTimerChange() 124 KalErrCode KalTimerStop(KalTimerId timerId)
in KalTimerStop() argument 126 if (timerId == NULL) {
in KalTimerStop() 129 KalTimer* tmpPtr = (KalTimer *)timerId;
in KalTimerStop() 139 KalErrCode KalTimerDelete(KalTimerId timerId)
in KalTimerDelete() argument 150 KalTimerIsRunning(KalTimerId timerId) KalTimerIsRunning() argument [all...] |
/commonlibrary/utils_lite/kal/timer/include/ |
H A D | kal.h | 40 KalErrCode KalTimerStart(KalTimerId timerId);
41 KalErrCode KalTimerChange(KalTimerId timerId, unsigned int millisec);
42 KalErrCode KalTimerStop(KalTimerId timerId);
43 KalErrCode KalTimerDelete(KalTimerId timerId);
44 unsigned int KalTimerIsRunning(KalTimerId timerId);
|
/commonlibrary/utils_lite/timer_task/src/ |
H A D | nativeapi_timer_task.c | 34 KalTimerId timerId = KalTimerCreate((KalTimerProc)userCallback, timerType, userContext, delay);
in StartTimerTask() local 35 if (timerId == NULL) {
in StartTimerTask() 39 if (KalTimerStart(timerId) != KAL_OK) {
in StartTimerTask() 40 StopTimerTask(timerId);
in StartTimerTask() 43 *timerHandle = timerId;
in StartTimerTask()
|
/commonlibrary/c_utils/base/test/unittest/common/ |
H A D | utils_event_test.cpp | 597 void Unregister(uint32_t timerId); 610 ErrCode ScheduleTimer(const TimerEventCallback& callback, uint32_t interval, uint32_t timerId, int& timerFd, 677 ErrCode Timer::ScheduleTimer(const TimerEventCallback& callback, uint32_t interval, uint32_t timerId, in ScheduleTimer() argument 682 handler->SetTimerId(timerId); in ScheduleTimer() 694 timerHandlers_.emplace(timerId, handler); // Add to the id2handlers map in ScheduleTimer() 708 uint32_t timerId = GetValidId(); // Get timerId in Register() local 710 uint32_t ret = ScheduleTimer(wrappedCb, interval, timerId, timerFd, once); in Register() 713 timerId << ", interval:" << interval << "timer-fd:" << timerFd << std::endl; in Register() 717 return timerId; in Register() 746 Unregister(uint32_t timerId) Unregister() argument 776 static std::atomic_uint32_t timerId = 1; GetValidId() local 1020 uint32_t timerId = timer_.Register(std::bind(&A::TimeOutProc, this), milliseconds, once); StartTimer() local 1053 uint32_t timerId = 0; TimerEvent() local [all...] |
H A D | utils_timer_test.cpp | 83 uint32_t timerId = timer.Register(TimeOutCallback1, 1); 85 timer.Unregister(timerId); 179 uint32_t timerId = timer_.Register(std::bind(&A::TimeOutProc, this), milliseconds, once); in StartTimer() local 180 return timerId != Utils::TIMER_ERR_DEAL_FAILED; in StartTimer() 220 uint32_t timerId = 0; in TimerEventFun() local 225 timerId = timer.Register(TimeOutCallback1, interval, true); in TimerEventFun() 228 timer.Unregister(timerId); in TimerEventFun() 229 timer.Unregister(timerId); in TimerEventFun()
|
/commonlibrary/c_utils/base/test/benchmarktest/event_benchmark_test/ |
H A D | event_benchmark_test.cpp | 728 void Unregister(uint32_t timerId); 741 ErrCode ScheduleTimer(const TimerEventCallback& callback, uint32_t interval, uint32_t timerId, int& timerFd, 813 uint32_t timerId, int& timerFd, bool once) in ScheduleTimer() 817 BENCHMARK_LOGD("Timer::ScheduleTimer interval: %{public}u -- timerId: %{public}u -- timerFd: %{public}d", in ScheduleTimer() 818 interval, timerId, timerFd); in ScheduleTimer() 820 handler->SetTimerId(timerId); in ScheduleTimer() 832 timerHandlers_.emplace(timerId, handler); // Add to the id2handlers map in ScheduleTimer() 847 uint32_t timerId = GetValidId(); // Get timerId in Register() local 849 uint32_t ret = ScheduleTimer(wrappedCb, interval, timerId, timerF in Register() 812 ScheduleTimer(const TimerEventCallback& callback, uint32_t interval, uint32_t timerId, int& timerFd, bool once) ScheduleTimer() argument 884 Unregister(uint32_t timerId) Unregister() argument 916 static std::atomic_uint32_t timerId = 1; GetValidId() local 1180 uint32_t timerId = timer_.Register(std::bind(&A::TimeOutProc, this), milliseconds, once); StartTimer() local 1230 uint32_t timerId = 0; BENCHMARK_F() local [all...] |
/commonlibrary/c_utils/base/include/ |
H A D | timer.h | 110 * @param timerId Indicates the ID of the timed event to delete. 114 void Unregister(uint32_t timerId); 122 uint32_t GetValidId(uint32_t timerId) const; 128 uint32_t timerId; // Unique ID. member
|
/commonlibrary/c_utils/base/test/fuzztest/timer_fuzzer/ |
H A D | timer_fuzzer.cpp | 42 uint32_t timerId = timer.Register(TimeOutCallback, interval, once); 43 val.push_back(timerId); 44 FUZZ_LOGI("Register, interval = %{public}d, once = %{public}d, timerId = %{public}d", interval, once, timerId); 57 FUZZ_LOGI("Unregister, timerId = %{public}d", val[id]);
|
/commonlibrary/c_utils/base/test/benchmarktest/timer_benchmark_test/ |
H A D | timer_benchmark_test.cpp | 169 uint32_t timerId = timer_.Register(std::bind(&A::TimeOutProc, this), milliseconds, once); in StartTimer() local 170 return timerId != Utils::TIMER_ERR_DEAL_FAILED; in StartTimer() 210 uint32_t timerId = 0; in BENCHMARK_F() local 212 timerId = timer.Register(TimeOutCallback1, 7, true); in BENCHMARK_F() 215 timer.Unregister(timerId); in BENCHMARK_F()
|