Home
last modified time | relevance | path

Searched refs:timer (Results 1 - 25 of 78) sorted by relevance

1234

/base/startup/init/services/loopevent/timer/
H A Dle_timer.c52 static void InsertTimerNode(EventLoop *loop, TimerNode *timer) in InsertTimerNode() argument
54 timer->endTime = GetCurrentTimespec(timer->timeout); in InsertTimerNode()
55 LoopMutexLock(&timer->mutex); in InsertTimerNode()
56 timer->flags &= ~TIMER_PROCESSING; in InsertTimerNode()
57 timer->repeat--; in InsertTimerNode()
58 OH_ListAddWithOrder(&loop->timerList, &timer->node, TimerNodeCompareProc); in InsertTimerNode()
60 LoopMutexUnlock(&timer->mutex); in InsertTimerNode()
70 TimerNode *timer = ListEntry(node, TimerNode, node); in CheckTimeoutOfTimer() local
71 if (timer in CheckTimeoutOfTimer()
88 TimerNode *timer = ListEntry(node, TimerNode, node); CheckTimeoutOfTimer() local
106 TimerNode *timer = (TimerNode *)malloc(sizeof(TimerNode)); CreateTimer() local
117 LE_CreateTimer(const LoopHandle loopHandle, TimerHandle *timer, LE_ProcessTimer processTimer, void *context) LE_CreateTimer() argument
133 LE_StartTimer(const LoopHandle loopHandle, const TimerHandle timer, uint64_t timeout, uint64_t repeat) LE_StartTimer() argument
159 TimerNode *timer = ListEntry(node, TimerNode, node); TimerNodeDestroyProc() local
173 TimerNode *timer = (TimerNode *)timerHandle; CancelTimer() local
187 LE_StopTimer(const LoopHandle loopHandle, const TimerHandle timer) LE_StopTimer() argument
[all...]
/base/powermgr/powermgr_lite/utils/src/
H A Dpower_mgr_timer_util.c37 static inline PowerTimerInfo *GetPowerTimerInfo(PowerTimer *timer) in GetPowerTimerInfo() argument
39 return GET_OBJECT(timer, PowerTimerInfo, timerId); in GetPowerTimerInfo()
49 static BOOL StartTimer(PowerTimer timer, int64_t whenMsec, int64_t intervalMsec) in StartTimer() argument
54 int32_t ret = timer_settime(timer, 0, &ts, NULL); in StartTimer()
56 POWER_HILOGE("Failed to start timer"); in StartTimer()
66 POWER_HILOGE("Invalid timer info"); in TimerHandle()
78 POWER_HILOGE("Failed allocate timer info"); in PowerMgrCreateTimer()
94 POWER_HILOGE("Failed to create timer"); in PowerMgrCreateTimer()
98 POWER_HILOGD("Succeed to create timer, id: %p", info->timerId); in PowerMgrCreateTimer()
103 BOOL PowerMgrResetTimer(PowerTimer *timer, int64_ argument
116 PowerMgrStartTimer(PowerTimer *timer, void *privateData) PowerMgrStartTimer() argument
129 PowerMgrRestartTimer(PowerTimer *timer, void *privateData) PowerMgrRestartTimer() argument
139 PowerMgrStopTimer(PowerTimer *timer) PowerMgrStopTimer() argument
151 PowerMgrDestroyTimer(PowerTimer *timer) PowerMgrDestroyTimer() argument
[all...]
/base/startup/init/test/unittest/loopevent/
H A Dlooptimer_unittest.cpp58 TimerHandle timer = NULL; in HWTEST_F() local
59 int ret = LE_CreateTimer(NULL, &timer, Test_ProcessTimer, NULL); in HWTEST_F()
65 ret = LE_CreateTimer(g_loop, &timer, NULL, NULL); in HWTEST_F()
68 CancelTimer(timer); in HWTEST_F()
86 TimerHandle timer = NULL; in HWTEST_F() local
88 int ret = LE_CreateTimer(g_loop, &timer, Test_ProcessTimer, NULL); in HWTEST_F()
90 ret = LE_StartTimer(g_loop, timer, 200, 1); in HWTEST_F()
104 TimerHandle timer = NULL; in HWTEST_F() local
105 int ret = LE_CreateTimer(g_loop, &timer, Test_ProcessTimer, NULL); in HWTEST_F()
107 ret = LE_StartTimer(g_loop, timer, 20 in HWTEST_F()
122 TimerHandle timer = NULL; HWTEST_F() local
153 TimerHandle timer = NULL; HWTEST_F() local
[all...]
/base/time/time_service/services/dfx/src/
H A Dtime_sysevent.cpp27 void StatisticReporter(int32_t callerPid, int32_t size, std::shared_ptr<TimerInfo> timer) in StatisticReporter() argument
29 int32_t callerUid = timer->uid; in StatisticReporter()
30 std::string bundleOrProcessName = timer->bundleName; in StatisticReporter()
31 int32_t type = timer->type; in StatisticReporter()
32 int64_t triggerTime = timer->whenElapsed.time_since_epoch().count(); in StatisticReporter()
33 auto interval = static_cast<uint64_t>(timer->repeatInterval.count()); in StatisticReporter()
40 "hisysevent Statistic failed! pid %{public}d,uid %{public}d,timer type %{public}d", callerPid, callerUid, in StatisticReporter()
/base/powermgr/power_manager/test/apitest/inner_api/ffrt/src/
H A Dffrt_utils_test.cpp280 FFRTTimer timer; in HWTEST_F() local
295 timer.SetTimer(TIMER_ID_A, taskA, 50); in HWTEST_F()
296 timer.SetTimer(TIMER_ID_B, taskB, 60); in HWTEST_F()
297 timer.SetTimer(TIMER_ID_C, taskC, 70); in HWTEST_F()
298 timer.CancelAllTimer(); in HWTEST_F()
303 timer.SetTimer(TIMER_ID_A, taskA, 50); in HWTEST_F()
304 timer.SetTimer(TIMER_ID_B, taskB, 60); in HWTEST_F()
305 timer.SetTimer(TIMER_ID_C, taskC, 70); in HWTEST_F()
306 timer.Clear(); in HWTEST_F()
311 timer in HWTEST_F()
329 FFRTTimer timer; HWTEST_F() local
[all...]
/base/powermgr/powermgr_lite/utils/include/
H A Dpower_mgr_timer_util.h31 * Create timer. Must call PowerMgrDestroyTimer to release memory after timer is not needed
36 * Reset timer attributes and stop timer
38 BOOL PowerMgrResetTimer(PowerTimer *timer, int64_t whenMsec, int64_t intervalMsec);
41 * Start timer. The privateData will set to PowerTimerCallback function when timer timeout
43 BOOL PowerMgrStartTimer(PowerTimer *timer, void *privateData);
46 * Restart timer. The privateData will set to PowerTimerCallback function when timer timeou
[all...]
/base/msdp/device_status/intention/scheduler/timer_manager/src/
H A Dtimer_manager.cpp165 [] (uint64_t s, const auto &timer) {
166 return (s |= (uint64_t(1U) << timer->id));
191 auto timer = std::make_unique<TimerItem>();
192 timer->id = nextTimerId;
193 timer->repeatCount = repeatCount;
194 timer->intervalMs = intervalMs;
195 timer->callbackCount = 0;
197 if (!AddInt64(nowTime, timer->intervalMs, timer->nextCallTime)) {
201 timer
[all...]
/base/powermgr/battery_statistics/test/unittest/src/clienttest/
H A Dstats_util_test.cpp153 std::shared_ptr<StatsHelper::ActiveTimer> timer = std::make_shared<StatsHelper::ActiveTimer>(); in HWTEST_F() local
154 EXPECT_TRUE(timer != nullptr); in HWTEST_F()
156 timer->StartRunning(); in HWTEST_F()
158 timer->StopRunning(); in HWTEST_F()
159 activeTimeMs = timer->GetRunningTimeMs(); in HWTEST_F()
164 timer->AddRunningTimeMs(addTimeMs); in HWTEST_F()
165 activeTimeMs = timer->GetRunningTimeMs(); in HWTEST_F()
169 timer->AddRunningTimeMs(StatsUtils::DEFAULT_VALUE); in HWTEST_F()
170 EXPECT_EQ(timer->GetRunningTimeMs(), activeTimeMs); in HWTEST_F()
172 timer in HWTEST_F()
189 std::shared_ptr<StatsHelper::ActiveTimer> timer = std::make_shared<StatsHelper::ActiveTimer>(); HWTEST_F() local
216 std::shared_ptr<StatsHelper::ActiveTimer> timer = std::make_shared<StatsHelper::ActiveTimer>(); HWTEST_F() local
[all...]
/base/time/time_service/services/timer/src/
H A Dtimer_manager.cpp156 "Create timer: %{public}d windowLength:%{public}" PRId64 "interval:%{public}" PRId64 "flag:%{public}d" in CreateTimer()
259 TIME_HILOGW(TIME_MODULE_SERVICE, "timer not exist"); in StopTimerInner()
399 auto whichAlarms = [id](const TimerInfo &timer) { in RemoveLocked()
400 return timer.id == id; in RemoveLocked()
419 [id](const std::shared_ptr<TimerInfo> &timer) { in RemoveLocked()
420 return timer->id == id; in RemoveLocked()
429 TIME_HILOGI(TIME_MODULE_SERVICE, "Set timer from delay list, id=%{public}" PRId64 "", pendingTimer->id); in RemoveLocked()
469 TIME_HILOGI(TIME_MODULE_SERVICE, "Set idle timer, id=%{public}" PRId64 "", alarm->id); in SetHandlerLocked()
498 void TimerManager::ReAddTimerLocked(std::shared_ptr<TimerInfo> timer, in ReAddTimerLocked() argument
502 ", timer originMaxWhenElapse in ReAddTimerLocked()
787 NotifyWantAgentRetry(std::shared_ptr<TimerInfo> timer) NotifyWantAgentRetry() argument
801 CheckUserIdForNotify(const std::shared_ptr<TimerInfo> &timer) CheckUserIdForNotify() argument
834 StatisticReporter(IPCSkeleton::GetCallingPid(), wakeupNums, timer); DeliverTimersLocked() local
872 NotifyWantAgent(const std::shared_ptr<TimerInfo> &timer) NotifyWantAgent() argument
987 ReCalcuOriWhenElapsed(std::shared_ptr<TimerInfo> timer, std::chrono::steady_clock::time_point nowElapsed) ReCalcuOriWhenElapsed() argument
1012 AdjustSingleTimer(std::shared_ptr<TimerInfo> timer) AdjustSingleTimer() argument
[all...]
H A Dtimer_proxy.cpp209 TIME_HILOGD(TIME_MODULE_SERVICE, "adjust timer state: %{public}d, interval: %{public}d", isAdjust, interval); in AdjustTimer()
210 auto callback = [this, isAdjust, interval, now] (std::shared_ptr<TimerInfo> timer) { in AdjustTimer()
211 if (timer == nullptr) { in AdjustTimer()
212 TIME_HILOGE(TIME_MODULE_SERVICE, "adjust timer is nullptr!"); in AdjustTimer()
215 return isAdjust ? UpdateAdjustWhenElapsed(now, interval, timer) : RestoreAdjustWhenElapsed(timer); in AdjustTimer()
225 uint32_t interval, std::shared_ptr<TimerInfo> &timer) in UpdateAdjustWhenElapsed()
227 if (IsTimerExemption(timer)) { in UpdateAdjustWhenElapsed()
228 TIME_HILOGD(TIME_MODULE_SERVICE, "adjust exemption timer bundleName: %{public}s", in UpdateAdjustWhenElapsed()
229 timer in UpdateAdjustWhenElapsed()
224 UpdateAdjustWhenElapsed(const std::chrono::steady_clock::time_point &now, uint32_t interval, std::shared_ptr<TimerInfo> &timer) UpdateAdjustWhenElapsed() argument
239 RestoreAdjustWhenElapsed(std::shared_ptr<TimerInfo> &timer) RestoreAdjustWhenElapsed() argument
266 IsTimerExemption(std::shared_ptr<TimerInfo> timer) IsTimerExemption() argument
[all...]
/base/startup/init/services/param/linux/
H A Dparam_msgadp.c124 int ParamTimerCreate(ParamTaskPtr *timer, ProcessTimer process, void *context) in ParamTimerCreate() argument
126 PARAM_CHECK(timer != NULL && process != NULL, return -1, "Invalid timer"); in ParamTimerCreate()
127 LE_STATUS status = LE_CreateTimer(LE_GetDefaultLoop(), timer, (LE_ProcessTimer)process, context); in ParamTimerCreate()
131 int ParamTimerStart(const ParamTaskPtr timer, uint64_t timeout, uint64_t repeat) in ParamTimerStart() argument
133 PARAM_CHECK(timer != NULL, return -1, "Invalid timer"); in ParamTimerStart()
134 return LE_StartTimer(LE_GetDefaultLoop(), timer, timeout, repeat); in ParamTimerStart()
137 void ParamTimerClose(ParamTaskPtr timer) in ParamTimerClose() argument
139 PARAM_CHECK(timer ! in ParamTimerClose()
[all...]
/base/startup/init/services/param/liteos/
H A Dparam_osadp.c44 ParamTimer *timer = (ParamTimer *)v.sival_ptr; in TimerHandle() local
45 PARAM_CHECK(timer != NULL, return, "Invalid timer"); in TimerHandle()
46 if (timer->timeProcessor != NULL) { in TimerHandle()
47 timer->timeProcessor(timer, timer->context); in TimerHandle()
65 PARAM_LOGE("Failed to start timer"); in StartTimer()
71 int ParamTimerCreate(ParamTaskPtr *timer, ProcessTimer process, void *context) in ParamTimerCreate() argument
73 PARAM_CHECK(timer ! in ParamTimerCreate()
94 ParamTimerStart(const ParamTaskPtr timer, uint64_t timeout, uint64_t repeat) ParamTimerStart() argument
104 ParamTimerClose(ParamTaskPtr timer) ParamTimerClose() argument
[all...]
/base/notification/distributed_notification_service/frameworks/ans/src/
H A Dreminder_request_timer.cpp35 sptr<MiscServices::TimeServiceClient> timer = MiscServices::TimeServiceClient::GetInstance(); in ReminderRequestTimer() local
36 if (timer == nullptr) { in ReminderRequestTimer()
39 int64_t bootTimeMs = timer->GetBootTimeMs(); in ReminderRequestTimer()
107 sptr<MiscServices::TimeServiceClient> timer = MiscServices::TimeServiceClient::GetInstance(); in UpdateTimeInfo() local
108 if (timer == nullptr) { in UpdateTimeInfo()
112 int64_t bootTime = timer->GetBootTimeMs(); in UpdateTimeInfo()
136 ANSR_LOGE("Failed to create reminder timer due to no memory."); in Unmarshalling()
/base/update/sys_installer/services/module_update/src/
H A Dmodule_file_repository.cpp39 void ModuleFileRepository::InitRepository(const string &hmpName, const Timer &timer) in InitRepository() argument
48 ProcessFile(hmpName, path, file, fileMap, timer); in InitRepository()
54 int result, const std::string &resultInfo, const Timer &timer) const in SaveInstallerResult()
75 resultInfo + "|" + std::to_string(timer.duration().count()) + "\n"; in SaveInstallerResult()
86 std::unordered_map<std::string, ModuleFile> &fileMap, const Timer &timer) const in ProcessFile()
97 SaveInstallerResult(path, hmpName, ModuleErrorCode::ERR_VERIFY_SIGN_FAIL, "img empty", timer); in ProcessFile()
103 SaveInstallerResult(path, hmpName, ModuleErrorCode::ERR_VERIFY_SIGN_FAIL, "get pub key fail", timer); in ProcessFile()
108 SaveInstallerResult(path, hmpName, ModuleErrorCode::ERR_VERIFY_SIGN_FAIL, "verify fail", timer); in ProcessFile()
113 SaveInstallerResult(path, hmpName, ModuleErrorCode::ERR_VERIFY_SIGN_FAIL, "hvb fail", timer); in ProcessFile()
/base/telephony/call_manager/utils/include/
H A Dtimer.h37 Timer(const Timer &timer) in Timer() argument
39 stopStatus_ = timer.stopStatus_.load(); in Timer()
40 tryStopFlag_ = timer.tryStopFlag_.load(); in Timer()
/base/update/sys_installer/services/module_update/include/
H A Dmodule_file_repository.h34 void InitRepository(const std::string &hmpName, const Timer &timer);
39 int result, const std::string &resultInfo, const Timer &timer) const;
42 std::unordered_map<std::string, ModuleFile> &fileMap, const Timer &timer) const;
H A Dmodule_update.h39 bool ActivateModules(ModuleUpdateStatus &status, const Timer &timer);
44 void ProcessHmpFile(const std::string &hmpFile, const ModuleUpdateStatus &status, const Timer &timer);
/base/theme/screenlock_mgr/test/unittest/
H A Dscreenlock_strongauth_test.cpp84 StrongAuthManger::authTimer timer(true, 1000, true, true); in HWTEST_F()
85 EXPECT_EQ(timer.repeat, true); in HWTEST_F()
86 EXPECT_EQ(timer.interval, 1000); in HWTEST_F()
/base/powermgr/battery_statistics/services/native/src/entities/
H A Dscreen_entity.cpp42 STATS_HILOGD(COMP_SVC, "Didn't find related timer, return 0"); in GetActiveTimeMs()
55 STATS_HILOGD(COMP_SVC, "No screen brightness timer found, return 0"); in GetActiveTimeMs()
117 std::shared_ptr<StatsHelper::ActiveTimer> timer = nullptr; in GetOrCreateTimer() local
121 STATS_HILOGD(COMP_SVC, "Get screen on timer"); in GetOrCreateTimer()
122 timer = screenOnTimer_; in GetOrCreateTimer()
125 STATS_HILOGD(COMP_SVC, "Create screen on timer"); in GetOrCreateTimer()
127 timer = screenOnTimer_; in GetOrCreateTimer()
137 STATS_HILOGD(COMP_SVC, "Get screen brightness timer of brightness level: %{public}d", level); in GetOrCreateTimer()
138 timer = iter->second; in GetOrCreateTimer()
141 STATS_HILOGD(COMP_SVC, "Create screen brightness timer o in GetOrCreateTimer()
[all...]
H A Dphone_entity.cpp46 STATS_HILOGD(COMP_SVC, "No phone on timer found, return 0"); in GetActiveTimeMs()
62 STATS_HILOGD(COMP_SVC, "No phone data timer found, return 0"); in GetActiveTimeMs()
140 std::shared_ptr<StatsHelper::ActiveTimer> timer = nullptr; in GetOrCreateTimer() local
143 return timer; in GetOrCreateTimer()
150 STATS_HILOGD(COMP_SVC, "Get phone on timer for level: %{public}d", level); in GetOrCreateTimer()
151 timer = onIter->second; in GetOrCreateTimer()
154 STATS_HILOGD(COMP_SVC, "Create phone on timer for level: %{public}d", level); in GetOrCreateTimer()
158 timer = phoneOnTimer; in GetOrCreateTimer()
164 STATS_HILOGD(COMP_SVC, "Get phone data timer for level: %{public}d", level); in GetOrCreateTimer()
165 timer in GetOrCreateTimer()
[all...]
H A Daudio_entity.cpp45 STATS_HILOGD(COMP_SVC, "Didn't find related timer for uid: %{public}d, return 0", uid); in GetActiveTimeMs()
107 std::shared_ptr<StatsHelper::ActiveTimer> timer = nullptr; in GetOrCreateTimer() local
112 STATS_HILOGD(COMP_SVC, "Get audio on timer for uid: %{public}d", uid); in GetOrCreateTimer()
113 timer = audioOnIter->second; in GetOrCreateTimer()
116 STATS_HILOGD(COMP_SVC, "Create audio on timer for uid: %{public}d", uid); in GetOrCreateTimer()
119 timer = audioTimer; in GetOrCreateTimer()
123 STATS_HILOGW(COMP_SVC, "Create active timer failed"); in GetOrCreateTimer()
126 return timer; in GetOrCreateTimer()
136 // Reset Audio on timer in Reset()
H A Dsensor_entity.cpp45 STATS_HILOGD(COMP_SVC, "Didn't find related timer for uid: %{public}d, return 0", uid); in GetActiveTimeMs()
56 STATS_HILOGD(COMP_SVC, "Didn't find related timer for uid: %{public}d, return 0", uid); in GetActiveTimeMs()
168 std::shared_ptr<StatsHelper::ActiveTimer> timer = nullptr; in GetOrCreateTimer() local
173 STATS_HILOGD(COMP_SVC, "Get gravity on timer for uid: %{public}d", uid); in GetOrCreateTimer()
174 timer = gravityOnIter->second; in GetOrCreateTimer()
177 STATS_HILOGD(COMP_SVC, "Create gravity on timer for uid: %{public}d", uid); in GetOrCreateTimer()
181 timer = gravityTimer; in GetOrCreateTimer()
187 STATS_HILOGD(COMP_SVC, "Get proximity on timer for uid: %{public}d", uid); in GetOrCreateTimer()
188 timer = proximityOnIter->second; in GetOrCreateTimer()
191 STATS_HILOGD(COMP_SVC, "Create proximity on timer fo in GetOrCreateTimer()
[all...]
H A Dbluetooth_entity.cpp185 STATS_HILOGD(COMP_SVC, "No bluetooth Br scan timer related to uid: %{public}d was found, return 0", uid); in GetActiveTimeMs()
196 STATS_HILOGD(COMP_SVC, "No bluetooth Ble scan timer related to uid: %{public}d was found, return 0", uid); in GetActiveTimeMs()
299 // Reset Bluetooth on timer and power consumption in Reset()
324 // Reset Bluetooth scan timer in Reset()
341 std::shared_ptr<StatsHelper::ActiveTimer> timer = nullptr; in GetOrCreateTimer() local
346 STATS_HILOGD(COMP_SVC, "Get blueooth Br scan timer for uid: %{public}d", uid); in GetOrCreateTimer()
347 timer = brScanIter->second; in GetOrCreateTimer()
350 STATS_HILOGD(COMP_SVC, "Create bluetooth Br scan timer for uid: %{public}d", uid); in GetOrCreateTimer()
354 timer = brScanTimer; in GetOrCreateTimer()
360 STATS_HILOGD(COMP_SVC, "Get blueooth Ble scan timer fo in GetOrCreateTimer()
381 std::shared_ptr<StatsHelper::ActiveTimer> timer = nullptr; GetOrCreateTimer() local
[all...]
/base/useriam/user_auth_framework/test/unittest/services/src/
H A Drelative_timer_test.cpp50 auto &timer = RelativeTimer::GetInstance(); in HWTEST_F() local
52 (void)timer.Register([&ensure]() { ensure.set_value(); }, 565); in HWTEST_F()
/base/startup/appspawn/standard/
H A Dappspawn_kickdog.c92 TimerHandle timer = NULL; in CreateTimerLoopTask() local
93 int ret = LE_CreateTimer(loop, &timer, ProcessTimerHandle, (void *)content); in CreateTimerLoopTask()
95 // start a timer to write kernel file every 10s in CreateTimerLoopTask()
96 ret = LE_StartTimer(loop, timer, APPSPAWN_WATCHDOG_KICKTIME, INT64_MAX); in CreateTimerLoopTask()

Completed in 230 milliseconds

1234