Home
last modified time | relevance | path

Searched refs:timerId (Results 1 – 25 of 56) sorted by relevance

123

/base/time/time_service/test/fuzztest/timetesttimer_fuzzer/
Dtimetesttimer_fuzzer.cpp36 uint64_t timerId = TimeServiceClient::GetInstance()->CreateTimer(timerInfo); in FuzzTimeCreateTimer() local
37 TimeServiceClient::GetInstance()->DestroyTimer(timerId); in FuzzTimeCreateTimer()
41 bool FuzzTimeStartTimer(int64_t timerId, size_t size) in FuzzTimeStartTimer() argument
43 TimeServiceClient::GetInstance()->StartTimer(timerId, timerId); in FuzzTimeStartTimer()
47 bool FuzzTimeStopTimer(int64_t timerId, size_t size) in FuzzTimeStopTimer() argument
49 TimeServiceClient::GetInstance()->StopTimer(timerId); in FuzzTimeStopTimer()
53 bool FuzzTimeDestroyTimer(int64_t timerId, size_t size) in FuzzTimeDestroyTimer() argument
55 TimeServiceClient::GetInstance()->DestroyTimer(timerId); in FuzzTimeDestroyTimer()
65 uint64_t timerId = 0; in FuzzTimeCreateTimerV9() local
66 TimeServiceClient::GetInstance()->CreateTimerV9(timerInfo, timerId); in FuzzTimeCreateTimerV9()
[all …]
/base/time/time_service/test/unittest/js_test/permission/
DSystemTimerNormal.test.js36 systemTimer.createTimer(options, async (err, timerId) => {
40 await systemTimer.destroyTimer(timerId)
41 expect(timerId > 0).assertTrue();
222 systemTimer.createTimer(options, async (err, timerId) => {
226 await systemTimer.destroyTimer(timerId);
227 expect(typeof (timerId) === 'number' && timerId > 0).assertEqual(true);
245 systemTimer.createTimer(options).then((timerId) => {
246 systemTimer.destroyTimer(timerId)
268 systemTimer.createTimer(options).then((timerId) => {
269 systemTimer.destroyTimer(timerId)
[all …]
DSystemTimerException.test.js35 let timerId = await systemTimer.createTimer(options)
36 console.info(`timerId ${timerId}`)
37 expect(timerId !== 0).assertTrue();
445 let timerId = await systemTimer.createTimer(options);
446 expect(Number.isInteger(timerId)).assertTrue();
447 systemTimer.startTimer(timerId, function (err) {
472 let timerId = await systemTimer.createTimer(options);
473 expect(Number.isInteger(timerId)).assertTrue();
474 systemTimer.startTimer(timerId).then(() => {
583 let timerId = await systemTimer.createTimer(options);
[all …]
/base/time/time_service/test/unittest/service_test/src/
Dtime_client_test.cpp358 uint64_t timerId = 0; variable
360 auto ret = TimeServiceClient::GetInstance()->StartTimerV9(timerId, 5);
362 ret = TimeServiceClient::GetInstance()->StopTimerV9(timerId);
364 ret = TimeServiceClient::GetInstance()->DestroyTimerV9(timerId);
382 uint64_t timerId; variable
383 auto errCode = TimeServiceClient::GetInstance()->CreateTimerV9(timerInfo, timerId);
384 TIME_HILOGI(TIME_MODULE_CLIENT, "timerId now : %{public}" PRId64 "", timerId);
386 auto ret = TimeServiceClient::GetInstance()->StartTimerV9(timerId, 2000);
389 ret = TimeServiceClient::GetInstance()->StopTimerV9(timerId);
391 ret = TimeServiceClient::GetInstance()->DestroyTimerV9(timerId);
[all …]
Dtime_service_test.cpp241 uint64_t timerId = 0; variable
242 TimeServiceClient::GetInstance()->CreateTimerV9(timerInfo, timerId);
243 EXPECT_NE(timerId, static_cast<uint64_t>(0));
244 TimeServiceClient::GetInstance()->DestroyTimerV9(timerId);
260 uint64_t timerId = 0; variable
261 TimeServiceClient::GetInstance()->CreateTimerV9(timerInfo, timerId);
262 EXPECT_NE(timerId, static_cast<uint64_t>(0));
267 TimeServiceClient::GetInstance()->StartTimerV9(timerId, static_cast<uint64_t>(time) + 2000);
273 TimeServiceClient::GetInstance()->DestroyTimerV9(timerId);
289 uint64_t timerId = 0; variable
[all …]
/base/time/time_service/services/time/src/
Dtimer_call_back.cpp48 bool TimerCallback::InsertTimerCallbackInfo(const uint64_t timerId, const std::shared_ptr<ITimerInf… in InsertTimerCallbackInfo() argument
56 auto info = timerInfoMap_.find(timerId); in InsertTimerCallbackInfo()
61 timerInfoMap_[timerId] = timerInfo; in InsertTimerCallbackInfo()
67 bool TimerCallback::RemoveTimerCallbackInfo(const uint64_t timerId) in RemoveTimerCallbackInfo() argument
71 auto info = timerInfoMap_.find(timerId); in RemoveTimerCallbackInfo()
81 void TimerCallback::NotifyTimer(const uint64_t timerId, const sptr<IRemoteObject> &timerCallback) in NotifyTimer() argument
87 auto it = timerInfoMap_.find(timerId); in NotifyTimer()
97 … TIME_HILOGE(TIME_MODULE_SERVICE, "timerCallback nullptr timerId:%{public}" PRId64 "", timerId); in NotifyTimer()
102 …ME_HILOGE(TIME_MODULE_SERVICE, "timerNotifyCallback nullptr timerId:%{public}" PRId64 "", timerId); in NotifyTimer()
105 timerNotifyCallback->Finish(timerId); in NotifyTimer()
/base/msdp/device_status/services/timer_manager/src/
Dtimer_manager.cpp68 int32_t timerId = AddTimerInternal(intervalMs, repeatCount, callback); in OnAddTimer() local
70 return timerId; in OnAddTimer()
73 int32_t TimerManager::RemoveTimer(int32_t timerId) in RemoveTimer() argument
77 … context_->GetDelegateTasks().PostSyncTask(std::bind(&TimerManager::OnRemoveTimer, this, timerId)); in RemoveTimer()
80 int32_t TimerManager::OnRemoveTimer(int32_t timerId) in OnRemoveTimer() argument
82 int32_t ret = RemoveTimerInternal(timerId); in OnRemoveTimer()
89 int32_t TimerManager::ResetTimer(int32_t timerId) in ResetTimer() argument
93 …n context_->GetDelegateTasks().PostSyncTask(std::bind(&TimerManager::OnResetTimer, this, timerId)); in ResetTimer()
96 int32_t TimerManager::OnResetTimer(int32_t timerId) in OnResetTimer() argument
98 int32_t ret = ResetTimerInternal(timerId); in OnResetTimer()
[all …]
/base/powermgr/thermal_manager/services/native/src/thermal_action/
Dthermal_timer.cpp68 uint64_t timerId = 0; in CreateTimer() local
69 timerId = TimeServiceClient::GetInstance()->CreateTimer(timerInfo); in CreateTimer()
70 if (timerId <= 0) { in CreateTimer()
72 return timerId; in CreateTimer()
74 return timerId; in CreateTimer()
77 bool ThermalTimer::StartTimer(uint64_t timerId, uint64_t triggerTime) in StartTimer() argument
80 auto ret = TimeServiceClient::GetInstance()->StartTimer(timerId, triggerTime); in StartTimer()
89 bool ThermalTimer::StopTimer(uint64_t timerId) in StopTimer() argument
91 auto ret = TimeServiceClient::GetInstance()->StopTimer(timerId); in StopTimer()
99 bool ThermalTimer::DestroyTimer(uint64_t timerId) in DestroyTimer() argument
[all …]
/base/msdp/device_status/services/timer_manager/include/
Dtimer_manager.h39 int32_t RemoveTimer(int32_t timerId) override;
40 int32_t ResetTimer(int32_t timerId);
41 bool IsExist(int32_t timerId) const;
57 int32_t OnRemoveTimer(int32_t timerId);
58 int32_t OnResetTimer(int32_t timerId);
60 bool OnIsExist(int32_t timerId) const;
61 int32_t RunIsExist(std::packaged_task<bool(int32_t)> &task, int32_t timerId) const;
64 int32_t RemoveTimerInternal(int32_t timerId);
65 int32_t ResetTimerInternal(int32_t timerId);
/base/time/time_service/framework/js/napi/system_timer/src/
Dnapi_system_timer.cpp195 uint64_t timerId = 0; in CreateTimer() member
210 createTimerContext->timerId); in CreateTimer()
217 uint64_t timerId = static_cast<uint64_t>(createTimerContext->timerId); in CreateTimer() local
218 createTimerContext->status = napi_create_int64(createTimerContext->env, timerId, &output); in CreateTimer()
228 uint64_t timerId = 0; in StartTimer() member
235 int64_t timerId = 0; in StartTimer() local
236 startTimerContext->status = napi_get_value_int64(env, argv[ARGV_FIRST], &timerId); in StartTimer()
239 startTimerContext->timerId = static_cast<uint64_t>(timerId); in StartTimer()
250 …TimeServiceClient::GetInstance()->StartTimerV9(startTimerContext->timerId, startTimerContext->trig… in StartTimer()
263 uint64_t timerId = 0; in StopTimer() member
[all …]
/base/time/time_service/interfaces/inner_api/src/
Dtime_service_client.cpp171 uint64_t timerId = 0; in CreateTimer() local
172 auto errCode = CreateTimerV9(TimerOptions, timerId); in CreateTimer()
173 TIME_HILOGI(TIME_MODULE_SERVICE, "CreateTimer id: %{public}" PRId64 "", timerId); in CreateTimer()
178 if (timerId == 0) { in CreateTimer()
182 TIME_HILOGI(TIME_MODULE_SERVICE, "CreateTimer id: %{public}" PRId64 "", timerId); in CreateTimer()
183 return timerId; in CreateTimer()
186 …t32_t TimeServiceClient::CreateTimerV9(std::shared_ptr<ITimerInfo> timerOptions, uint64_t &timerId) in CreateTimerV9() argument
204 auto errCode = proxy->CreateTimer(timerOptions, timerCallbackInfoObject, timerId); in CreateTimerV9()
209 TIME_HILOGI(TIME_MODULE_SERVICE, "CreateTimer id: %{public}" PRId64 "", timerId); in CreateTimerV9()
210 auto ret = TimerCallback::GetInstance()->InsertTimerCallbackInfo(timerId, timerOptions); in CreateTimerV9()
[all …]
/base/update/updateservice/services/utils/src/
Ddupdate_timer.c33 timer_t timerId; member
85 int ret = timer_delete(g_timerList[i].timer.timerId); in ExitUpdateTimer()
99 timer_t timerId; in RegisterCycleTimerCB() local
107 int ret = timer_create(CLOCK_REALTIME, &evp, &timerId); in RegisterCycleTimerCB()
115 g_timerList[tid].timer.timerId = timerId; in RegisterCycleTimerCB()
134 int ret = timer_delete(g_timerList[tid].timer.timerId); in DeregisterCycleTimerCB()
165 int ret = timer_settime(timer->timerId, 0, &it, NULL); in StartTimer()
185 int ret = timer_settime(timer->timerId, 0, &it, NULL); in StopTimer()
/base/powermgr/powermgr_lite/utils/src/
Dpower_mgr_timer_util.c29 PowerTimer timerId; member
39 return GET_OBJECT(timer, PowerTimerInfo, timerId); in GetPowerTimerInfo()
92 int32_t ret = timer_create(CLOCK_REALTIME, &evp, &info->timerId); in PowerMgrCreateTimer()
98 POWER_HILOGD("Succeed to create timer, id: %p", info->timerId); in PowerMgrCreateTimer()
100 return &info->timerId; in PowerMgrCreateTimer()
126 return StartTimer(info->timerId, info->whenMsec, info->intervalMsec); in PowerMgrStartTimer()
148 return StartTimer(info->timerId, 0, 0); in PowerMgrStopTimer()
159 int32_t ret = timer_delete(info->timerId); in PowerMgrDestroyTimer()
/base/security/device_security_level/baselib/utils/src/
Dutils_timer.cpp58 uint32_t timerId = st.Register(std::bind(&DoTimerProcess, callback, context), interval, false); in UtilsStartPeriodicTimerTask() local
59 return static_cast<TimerHandle>(timerId); in UtilsStartPeriodicTimerTask()
65 uint32_t timerId = st.Register(std::bind(&DoTimerProcess, callback, context), interval, true); in UtilsStartOnceTimerTask() local
66 return static_cast<TimerHandle>(timerId); in UtilsStartOnceTimerTask()
/base/time/time_service/services/timer/include/
Dtimer_manager_interface.h57 int uid, uint64_t &timerId) = 0;
59 virtual int32_t StartTimer(uint64_t timerId, uint64_t triggerTime) = 0;
60 virtual int32_t StopTimer(uint64_t timerId) = 0;
61 virtual int32_t DestroyTimer(uint64_t timerId) = 0;
/base/time/time_service/interfaces/inner_api/include/
Dtime_service_client.h285 TIME_API int32_t CreateTimerV9(std::shared_ptr<ITimerInfo> timerOptions, uint64_t &timerId);
296 TIME_API bool StartTimer(uint64_t timerId, uint64_t triggerTime);
307 TIME_API int32_t StartTimerV9(uint64_t timerId, uint64_t triggerTime);
317 TIME_API bool StopTimer(uint64_t timerId);
327 TIME_API int32_t StopTimerV9(uint64_t timerId);
337 TIME_API bool DestroyTimer(uint64_t timerId);
347 TIME_API int32_t DestroyTimerV9(uint64_t timerId);
/base/time/time_service/services/time/include/inner_api_include/
Dtimer_call_back.h32 …virtual void NotifyTimer(const uint64_t timerId, const sptr<IRemoteObject> &timerCallback) overrid…
40 …bool InsertTimerCallbackInfo(const uint64_t timerId, const std::shared_ptr<ITimerInfo> &timerInfo);
41 bool RemoveTimerCallbackInfo(const uint64_t timerId);
/base/time/time_service/services/ipc/stub/
Dtimer_notify_callback_stub.cpp44 auto timerId = data.ReadUint64(); in OnFinishStub() local
45 TIME_HILOGD(TIME_MODULE_SERVICE, "id: %{public}" PRId64 "", timerId); in OnFinishStub()
46 Finish(timerId); in OnFinishStub()
Dtimer_call_back_stub.cpp43 auto timerId = data.ReadUint64(); in OnTriggerStub() local
44 TIME_HILOGD(TIME_MODULE_CLIENT, "id: %{public}" PRId64 "", timerId); in OnTriggerStub()
46 NotifyTimer(timerId, obj); in OnTriggerStub()
/base/time/time_service/services/ipc/proxy/
Dtimer_notify_callback_proxy.cpp30 void TimerNotifyCallbackProxy::Finish(const uint64_t timerId) in Finish() argument
32 TIME_HILOGD(TIME_MODULE_CLIENT, "start id:%{public}" PRId64 "", timerId); in Finish()
46 if (!data.WriteUint64(timerId)) { in Finish()
Dtimer_call_back_proxy.cpp29 void TimerCallbackProxy::NotifyTimer(const uint64_t timerId, const sptr<IRemoteObject> &timerCallba… in NotifyTimer() argument
31 TIME_HILOGD(TIME_MODULE_CLIENT, "start id: %{public}" PRId64 "", timerId); in NotifyTimer()
46 if (!data.WriteUint64(timerId)) { in NotifyTimer()
/base/time/time_service/services/ipc/base/
Dtime_service_interface.h128 uint64_t &timerId) = 0;
137 virtual int32_t StartTimer(uint64_t timerId, uint64_t triggerTime) = 0;
145 virtual int32_t StopTimer(uint64_t timerId) = 0;
153 virtual int32_t DestroyTimer(uint64_t timerId) = 0;
/base/time/time_service/services/ipc/proxy/inner_api_include/
Dtime_service_proxy.h42 uint64_t &timerId) override;
43 int32_t StartTimer(uint64_t timerId, uint64_t triggerTime) override;
44 int32_t StopTimer(uint64_t timerId) override;
45 int32_t DestroyTimer(uint64_t timerId) override;
/base/useriam/user_auth_framework/services/base/src/
Drelative_timer.cpp42 void RelativeTimer::Unregister(uint32_t timerId) in Unregister() argument
44 return timer_.Unregister(timerId); in Unregister()
/base/powermgr/thermal_manager/services/native/include/thermal_action/
Dthermal_timer.h56 bool StartTimer(uint64_t timerId, uint64_t triggerTime);
57 bool StopTimer(uint64_t timerId);
58 bool DestroyTimer(uint64_t timerId);

123