mirror of
https://github.com/openharmony/miscservices_time.git
synced 2026-07-19 20:03:38 -04:00
+1
-1
@@ -241,5 +241,5 @@ console.log('end');
|
||||
|
||||
**Misc软件服务子系统**
|
||||
|
||||
miscservices\_time
|
||||
[miscservices\_time](https://gitee.com/openharmony/miscservices_time/tree/OpenHarmony-3.0-LTS/)
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@ napi_value StartTimer(napi_env env, napi_callback_info info)
|
||||
return JSParaError(env, callback);
|
||||
}
|
||||
|
||||
AsyncCallbackInfoStart *asynccallbackinfo = new (std::nothrow)AsyncCallbackInfoStart{
|
||||
AsyncCallbackInfoStart *asynccallbackinfo = new (std::nothrow)AsyncCallbackInfoStart {
|
||||
.env = env,
|
||||
.asyncWork = nullptr,
|
||||
.timerId = timerId,
|
||||
|
||||
@@ -205,7 +205,7 @@ void TimeService::PaserTimerPara(int32_t type, bool repeat, uint64_t interval, T
|
||||
return;
|
||||
}
|
||||
|
||||
uint64_t TimeService::CreateTimer(int32_t type, bool repeat, uint64_t interval,
|
||||
uint64_t TimeService::CreateTimer(int32_t type, bool repeat, uint64_t interval,
|
||||
sptr<IRemoteObject> &obj)
|
||||
{
|
||||
if (obj == nullptr) {
|
||||
|
||||
@@ -87,7 +87,7 @@ bool Batch::Remove(std::function<bool (const TimerInfo &)> predicate)
|
||||
auto newStart = std::chrono::steady_clock::time_point::min();
|
||||
auto newEnd = std::chrono::steady_clock::time_point::max();
|
||||
uint32_t newFlags = 0;
|
||||
for (auto it = alarms_.begin(); it != alarms_.end(); ) {
|
||||
for (auto it = alarms_.begin(); it != alarms_.end();) {
|
||||
auto alarm = *it;
|
||||
TIME_HILOGD(TIME_MODULE_SERVICE, "looper");
|
||||
if (predicate(*alarm)) {
|
||||
|
||||
@@ -236,7 +236,7 @@ void TimerManager::RemoveLocked(uint64_t id)
|
||||
};
|
||||
|
||||
bool didRemove = false;
|
||||
for (auto it = alarmBatches_.begin(); it != alarmBatches_.end(); ) {
|
||||
for (auto it = alarmBatches_.begin(); it != alarmBatches_.end();) {
|
||||
auto batch = *it;
|
||||
didRemove = batch->Remove(whichAlarms);
|
||||
if (batch->Size() == 0) {
|
||||
|
||||
Reference in New Issue
Block a user