/base/time/time_service/test/fuzztest/timeservice_fuzzer/timerproxy_fuzzer/ |
H A D | timerproxy_fuzzer.cpp | 33 auto now = std::chrono::steady_clock::now(); in FuzzTimerProxyTimer() local 37 TimerProxy::GetInstance().ProxyTimer(uid, true, true, now, callback); in FuzzTimerProxyTimer() 38 TimerProxy::GetInstance().ProxyTimer(uid, true, false, now, callback); in FuzzTimerProxyTimer() 39 TimerProxy::GetInstance().ProxyTimer(uid, false, true, now, callback); in FuzzTimerProxyTimer() 40 TimerProxy::GetInstance().ProxyTimer(uid, false, false, now, callback); in FuzzTimerProxyTimer() 42 TimerProxy::GetInstance().PidProxyTimer(uid, true, true, now, callback); in FuzzTimerProxyTimer() 43 TimerProxy::GetInstance().PidProxyTimer(uid, true, false, now, callback); in FuzzTimerProxyTimer() 44 TimerProxy::GetInstance().PidProxyTimer(uid, false, true, now, callback); in FuzzTimerProxyTimer() 45 TimerProxy::GetInstance().PidProxyTimer(uid, false, false, now, callbac in FuzzTimerProxyTimer() 52 auto now = std::chrono::steady_clock::now(); FuzzTimerAdjustTimer() local 70 auto now = std::chrono::steady_clock::now(); FuzzTimerResetProxy() local [all...] |
/base/hiviewdfx/hiview/plugins/faultlogger/test/common/unittest/ |
H A D | faultlogger_client_unittest.cpp | 54 auto now = time(nullptr); in HWTEST_F() local 55 auto info = CreateFaultLogInfo(now, getuid(), FaultLogType::CPP_CRASH, "faultlogtest0"); in HWTEST_F() 85 auto now = time(nullptr); in HWTEST_F() local 89 auto task = [](int32_t now) { in HWTEST_F() 90 printf("AddFaultLog %d\n", now); in HWTEST_F() 91 auto info = CreateFaultLogInfo(now, getuid(), FaultLogType::CPP_CRASH, "faultlogtest1"); in HWTEST_F() 97 now = now + 1; in HWTEST_F() 98 timeStamps.push_back(now); in HWTEST_F() 99 task(now); in HWTEST_F() 127 auto now = time(nullptr); HWTEST_F() local [all...] |
/base/hiviewdfx/hiview/base/utility/ |
H A D | time_util.cpp | 41 struct timeval now; in GenerateTimestamp() local 42 if (gettimeofday(&now, nullptr) == -1) { in GenerateTimestamp() 45 return (now.tv_sec * SEC_TO_MICROSEC + now.tv_usec); in GenerateTimestamp() 55 auto now = std::chrono::system_clock::now(); in GetSeconds() local 56 auto secs = std::chrono::duration_cast<std::chrono::seconds>(now.time_since_epoch()); in GetSeconds() 62 auto now = std::chrono::system_clock::now(); in GetMilliseconds() local 63 auto millisecs = std::chrono::duration_cast<std::chrono::milliseconds>(now in GetMilliseconds() 99 time_t now = std::time(nullptr); Get0ClockStampMs() local 113 auto now = std::chrono::steady_clock::now(); GetSteadyClockTimeMs() local [all...] |
/base/notification/distributed_notification_service/services/distributed/src/ |
H A D | distributed_flow_control.cpp | 31 std::chrono::system_clock::time_point now = std::chrono::system_clock::now(); in KvManagerFlowControl() local 33 return now - value > std::chrono::minutes(1); in KvManagerFlowControl() 43 if (now - value > std::chrono::seconds(1)) { in KvManagerFlowControl() 53 kvDataManagerTimestampList_.push_front(now); in KvManagerFlowControl() 59 std::chrono::system_clock::time_point now = std::chrono::system_clock::now(); in KvStoreFlowControl() local 61 return now - value > std::chrono::minutes(1); in KvStoreFlowControl() 71 if (now - value > std::chrono::seconds(1)) { in KvStoreFlowControl() 81 kvStoreTimestampList_.push_front(now); in KvStoreFlowControl() [all...] |
/base/notification/eventhandler/test/systemtest/ems_inner_event_system_test/ |
H A D | ems_inner_event_system_test.cpp | 138 InnerEvent::TimePoint now = InnerEvent::Clock::now(); in HWTEST_F() local 139 event->SetHandleTime(now); in HWTEST_F() 141 EXPECT_EQ(now, handleTime); in HWTEST_F() 152 InnerEvent::TimePoint now = InnerEvent::TimePoint::max(); in HWTEST_F() local 153 event->SetHandleTime(now); in HWTEST_F() 155 EXPECT_EQ(now, handleTime); in HWTEST_F() 167 InnerEvent::TimePoint now = InnerEvent::Clock::time_point(); in HWTEST_F() local 168 event->SetHandleTime(now); in HWTEST_F() 170 EXPECT_EQ(now, handleTim in HWTEST_F() 181 InnerEvent::TimePoint now = InnerEvent::TimePoint::min(); HWTEST_F() local 195 InnerEvent::TimePoint now; HWTEST_F() local [all...] |
/base/time/time_service/services/timer/include/ |
H A D | timer_proxy.h | 39 const std::chrono::steady_clock::time_point &now, 42 const std::chrono::steady_clock::time_point &now, 45 const std::chrono::steady_clock::time_point &now, 49 bool ResetAllProxy(const std::chrono::steady_clock::time_point &now, 63 bool ShowProxyTimerInfo(int fd, const int64_t now); 64 bool ShowPidProxyTimerInfo(int fd, const int64_t now); 65 bool ShowUidTimerMapInfo(int fd, const int64_t now); 66 bool ShowPidTimerMapInfo(int fd, const int64_t now); 77 const std::chrono::steady_clock::time_point &now, 80 const std::chrono::steady_clock::time_point &now, [all...] |
/base/notification/distributed_notification_service/services/distributed/test/unittest/ |
H A D | distributed_flow_control_test.cpp | 51 std::chrono::system_clock::time_point now = std::chrono::system_clock::now();
in HWTEST_F() local 52 distributedFlowControl.kvStoreTimestampList_.push_front(now);
in HWTEST_F() 69 std::chrono::system_clock::time_point now = std::chrono::system_clock::now();
in HWTEST_F() local 70 distributedFlowControl.kvStoreTimestampList_.push_front(now);
in HWTEST_F()
|
/base/notification/common_event_service/services/src/ |
H A D | publish_manager.cpp | 36 int64_t now = SystemTime::GetNowSysTime(); in CheckIsFloodAttack() local 37 EVENT_LOGD("dispatch common event by app (uid = %{publish}d) at now = %{public}" PRId64, appUid, now); in CheckIsFloodAttack() 40 floodAttackAppStatistics_[appUid].emplace_back(now); in CheckIsFloodAttack() 46 if (now - *iterVec > FLOOD_ATTACK_INTERVAL_MAX) { in CheckIsFloodAttack() 56 iter->second.emplace_back(now); in CheckIsFloodAttack()
|
/base/global/resource_management/frameworks/resmgr/test/unittest/common/ |
H A D | resource_manager_performance_test.cpp | 118 auto t1 = std::chrono::high_resolution_clock::now(); in ParseIndexCost() 142 auto t2 = std::chrono::high_resolution_clock::now(); in ParseIndexCost() 159 auto start = std::chrono::high_resolution_clock::now(); in TestLoadFromIndex() 181 auto end = std::chrono::high_resolution_clock::now(); in TestLoadFromIndex() 232 auto t1 = std::chrono::high_resolution_clock::now(); in HWTEST_F() 234 auto t2 = std::chrono::high_resolution_clock::now(); in HWTEST_F() 267 auto t1 = std::chrono::high_resolution_clock::now(); in HWTEST_F() 269 auto t2 = std::chrono::high_resolution_clock::now(); in HWTEST_F() 304 auto t1 = std::chrono::high_resolution_clock::now(); in HWTEST_F() 306 auto t2 = std::chrono::high_resolution_clock::now(); in HWTEST_F() [all...] |
/base/global/resource_management_lite/frameworks/resmgr_lite/test/unittest/lite/common/ |
H A D | resource_manager_performance_test.cpp | 120 auto start = std::chrono::high_resolution_clock::now(); in TestLoadFromIndex() 142 auto end = std::chrono::high_resolution_clock::now(); in TestLoadFromIndex() 150 auto t1 = std::chrono::high_resolution_clock::now(); in TestLoadFromIndex() 179 auto t2 = std::chrono::high_resolution_clock::now(); in TestLoadFromIndex() 225 auto t1 = std::chrono::high_resolution_clock::now(); in HWTEST_F() 227 auto t2 = std::chrono::high_resolution_clock::now(); in HWTEST_F() 260 auto t1 = std::chrono::high_resolution_clock::now(); in HWTEST_F() 262 auto t2 = std::chrono::high_resolution_clock::now(); in HWTEST_F() 297 auto t1 = std::chrono::high_resolution_clock::now(); in HWTEST_F() 299 auto t2 = std::chrono::high_resolution_clock::now(); in HWTEST_F() [all...] |
/base/hiviewdfx/hicollie/frameworks/native/test/unittest/common/ |
H A D | watchdog_task_test.cpp | 73 uint64_t now = GetCurrentTickMillseconds() + 1000;
in HWTEST_F() local 77 task.Run(now);
in HWTEST_F() 110 uint64_t now = GetCurrentTickMillseconds();
in HWTEST_F() local 111 task.triggerTimes.push_back(now);
in HWTEST_F() 112 task.triggerTimes.push_back(now + 1000);
in HWTEST_F() 113 task.triggerTimes.push_back(now + 2000);
in HWTEST_F()
|
/base/hiviewdfx/hiview/base/event_store/test/unittest/common/ |
H A D | sys_event_repeat_test.cpp | 73 time_t now = time(nullptr); in HWTEST_F() local 74 sysEventCreator.SetKeyValue("testTime", now); in HWTEST_F() 102 time_t now = time(nullptr); in HWTEST_F() local 103 sysEventCreator.SetKeyValue("testTime", now); in HWTEST_F() 104 auto testHash = "testhash" + std::to_string(now); in HWTEST_F() 145 time_t now = time(nullptr); in HWTEST_F() local 146 sysEventCreator.SetKeyValue("testTime", now); in HWTEST_F() 172 time_t now = time(nullptr); in HWTEST_F() local 175 now++; in HWTEST_F() 176 sysEventHashRecord.eventHash = "testhash" + std::to_string(now); in HWTEST_F() [all...] |
/base/hiviewdfx/hiview/plugins/faultlogger/interfaces/cpp/innerkits/test/common/moduletest/ |
H A D | faultlogger_native_interface_test.cpp | 54 auto now = time(nullptr); in HWTEST_F() local 55 auto info = CreateFaultLogInfo(now, getuid(), FaultLogType::CPP_CRASH, "faultloggertest"); in HWTEST_F() 58 ASSERT_TRUE(CheckLogFileExist(now, getuid(), "cppcrash", "faultloggertest")); in HWTEST_F() 75 auto now = time(nullptr); in HWTEST_F() local 77 AddFaultLog(now, FaultLogType::CPP_CRASH, module, "faultloggertestsummary2"); in HWTEST_F() 79 ASSERT_TRUE(CheckLogFileExist(now, getuid(), "cppcrash", module)); in HWTEST_F() 96 auto now = time(nullptr); in HWTEST_F() local 101 AddFaultLog(now + i, FaultLogType::CPP_CRASH, module, "faultloggertestsummary2"); in HWTEST_F() 107 ASSERT_TRUE(CheckLogFileExist(now + i, getuid(), "cppcrash", module)); in HWTEST_F() 111 ASSERT_FALSE(CheckLogFileExist(now in HWTEST_F() 126 auto now = time(nullptr); HWTEST_F() local [all...] |
/base/global/i18n/frameworks/zone/test/unittest/ |
H A D | zone_util_performance_test.cpp | 65 auto t1 = std::chrono::high_resolution_clock::now();
in HWTEST_F() 67 auto t2 = std::chrono::high_resolution_clock::now();
in HWTEST_F() 91 auto t1 = std::chrono::high_resolution_clock::now();
in HWTEST_F() 93 auto t2 = std::chrono::high_resolution_clock::now();
in HWTEST_F() 115 auto t1 = std::chrono::high_resolution_clock::now();
in HWTEST_F() 117 auto t2 = std::chrono::high_resolution_clock::now();
in HWTEST_F() 138 auto t1 = std::chrono::high_resolution_clock::now();
in HWTEST_F() 140 auto t2 = std::chrono::high_resolution_clock::now();
in HWTEST_F() 161 auto t1 = std::chrono::high_resolution_clock::now();
in HWTEST_F() 163 auto t2 = std::chrono::high_resolution_clock::now();
in HWTEST_F() [all...] |
/base/notification/eventhandler/frameworks/eventhandler/include/ |
H A D | event_handler_utils.h | 35 // Help to convert time point into delay time from now. 38 InnerEvent::TimePoint now = InnerEvent::Clock::now(); in TimePointToTimeOut() local 39 if (when <= now) { in TimePointToTimeOut() 43 auto duration = when - now; in TimePointToTimeOut() 109 InnerEvent::TimePoint now = InnerEvent::Clock::now(); in GetTimeStamp() local 110 auto epoch = now.time_since_epoch(); in GetTimeStamp()
|
/base/telephony/telephony_data/common/include/ |
H A D | time_util.h | 67 time_t now = time(DEFAULT_TIMER); in GetCurrentTime() local 68 if (now == -1) { in GetCurrentTime() 72 struct tm *ltm = localtime_r(&now, &tm); in GetCurrentTime() 83 time_t now = time(DEFAULT_TIMER) - THIRTY_DAYS; in GetTimeOfThirty() local 84 date = std::to_string(now); in GetTimeOfThirty()
|
/base/telephony/ril_adapter/services/hril/src/ |
H A D | hril_event.cpp | 46 struct timeval now; in GetNextTimeOut() local 47 GetNowTime(now); in GetNextTimeOut() 48 TELEPHONY_LOGD("now = %{public}ds + %{public}dus", (int32_t)now.tv_sec, (int32_t)now.tv_usec); in GetNextTimeOut() 51 if (timercmp(&eventIt->timeout, &now, >)) { in GetNextTimeOut() 52 timersub(&eventIt->timeout, &now, &tv); in GetNextTimeOut() 62 struct timeval now; in ProcessTimerList() local 65 GetNowTime(now); in ProcessTimerList() 67 TELEPHONY_LOGD("finding for timers <= %{public}ds + %{public}dus", (int32_t)now in ProcessTimerList() 158 struct timeval now; AddTimerEvent() local [all...] |
/base/startup/appspawn/modules/sysevent/ |
H A D | appspawn_hisysevent.cpp | 29 auto now = std::chrono::system_clock::now(); in AppSpawnHiSysEventWrite() local 30 int64_t timeStamp = std::chrono::duration_cast<std::chrono::seconds>(now.time_since_epoch()).count(); in AppSpawnHiSysEventWrite()
|
/base/telephony/call_manager/services/spam_call/src/ |
H A D | time_wait_helper.cpp | 45 auto now = std::chrono::system_clock::now(); in WaitForResult() local 47 if (cv_.wait_until(lock, now + std::chrono::seconds(waitTime_)) == ffrt::cv_status::timeout) { in WaitForResult()
|
/base/time/time_service/services/timer/src/ |
H A D | timer_proxy.cpp | 124 const std::chrono::steady_clock::time_point &now, in ProxyTimer() 131 UpdateProxyWhenElapsedForProxyUidMap(uid, now, insertAlarmCallback); in ProxyTimer() 134 if (!RestoreProxyWhenElapsedForProxyUidMap(uid, now, insertAlarmCallback)) { in ProxyTimer() 163 const std::chrono::steady_clock::time_point &now, in PidProxyTimer() 171 UpdateProxyWhenElapsedForProxyPidMap(pid, now, insertAlarmCallback); in PidProxyTimer() 175 if (!RestoreProxyWhenElapsedForProxyPidMap(pid, now, insertAlarmCallback)) { in PidProxyTimer() 205 const std::chrono::steady_clock::time_point &now, in AdjustTimer() 210 auto callback = [this, isAdjust, interval, now] (std::shared_ptr<TimerInfo> timer) { in AdjustTimer() 215 return isAdjust ? UpdateAdjustWhenElapsed(now, interval, timer) : RestoreAdjustWhenElapsed(timer); in AdjustTimer() 224 bool TimerProxy::UpdateAdjustWhenElapsed(const std::chrono::steady_clock::time_point &now, in UpdateAdjustWhenElapsed() argument 123 ProxyTimer(int32_t uid, bool isProxy, bool needRetrigger, const std::chrono::steady_clock::time_point &now, std::function<void(std::shared_ptr<TimerInfo> &alarm)> insertAlarmCallback) ProxyTimer() argument 162 PidProxyTimer(int pid, bool isProxy, bool needRetrigger, const std::chrono::steady_clock::time_point &now, std::function<void(std::shared_ptr<TimerInfo> &alarm)> insertAlarmCallback) PidProxyTimer() argument 204 AdjustTimer(bool isAdjust, uint32_t interval, const std::chrono::steady_clock::time_point &now, std::function<void(AdjustTimerCallback adjustTimer)> updateTimerDeliveries) AdjustTimer() argument 313 ResetAllProxy(const std::chrono::steady_clock::time_point &now, std::function<void(std::shared_ptr<TimerInfo> &alarm)> insertAlarmCallback) ResetAllProxy() argument 523 UpdateProxyWhenElapsedForProxyUidMap(const int32_t uid, const std::chrono::steady_clock::time_point &now, std::function<void(std::shared_ptr<TimerInfo> &alarm)> insertAlarmCallback) UpdateProxyWhenElapsedForProxyUidMap() argument 556 UpdateProxyWhenElapsedForProxyPidMap(int pid, const std::chrono::steady_clock::time_point &now, std::function<void(std::shared_ptr<TimerInfo> &alarm)> insertAlarmCallback) UpdateProxyWhenElapsedForProxyPidMap() argument 589 RestoreProxyWhenElapsedByUid(const int32_t uid, const std::chrono::steady_clock::time_point &now, std::function<void(std::shared_ptr<TimerInfo> &alarm)> insertAlarmCallback) RestoreProxyWhenElapsedByUid() argument 627 RestoreProxyWhenElapsedByPid(const int pid, const std::chrono::steady_clock::time_point &now, std::function<void(std::shared_ptr<TimerInfo> &alarm)> insertAlarmCallback) RestoreProxyWhenElapsedByPid() argument 664 RestoreProxyWhenElapsedForProxyUidMap(const int32_t uid, const std::chrono::steady_clock::time_point &now, std::function<void(std::shared_ptr<TimerInfo> &alarm)> insertAlarmCallback) RestoreProxyWhenElapsedForProxyUidMap() argument 675 RestoreProxyWhenElapsedForProxyPidMap(const int pid, const std::chrono::steady_clock::time_point &now, std::function<void(std::shared_ptr<TimerInfo> &alarm)> insertAlarmCallback) RestoreProxyWhenElapsedForProxyPidMap() argument 687 ResetAllProxyWhenElapsed(const std::chrono::steady_clock::time_point &now, std::function<void(std::shared_ptr<TimerInfo> &alarm)> insertAlarmCallback) ResetAllProxyWhenElapsed() argument 697 ResetAllPidProxyWhenElapsed(const std::chrono::steady_clock::time_point &now, std::function<void(std::shared_ptr<TimerInfo> &alarm)> insertAlarmCallback) ResetAllPidProxyWhenElapsed() argument 707 ShowProxyTimerInfo(int fd, const int64_t now) ShowProxyTimerInfo() argument 734 ShowUidTimerMapInfo(int fd, const int64_t now) ShowUidTimerMapInfo() argument 751 ShowPidTimerMapInfo(int fd, const int64_t now) ShowPidTimerMapInfo() argument [all...] |
/base/hiviewdfx/hiview/base/test/unittest/common/ |
H A D | event_base_test.cpp | 27 auto now = std::chrono::system_clock::now(); in GetCurrentMillis() local 28 auto millisecs = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()); in GetCurrentMillis() 74 auto now = GetCurrentMillis(); in HWTEST_F() local 75 LoopEvent event1 = LoopEvent::CreateLoopEvent(now); in HWTEST_F() 76 LoopEvent event2 = LoopEvent::CreateLoopEvent(now + 200); // 200ms later in HWTEST_F()
|
/base/notification/distributed_notification_service/frameworks/ans/src/ |
H A D | reminder_request_timer.cpp | 31 time_t now; // unit is seconds. in ReminderRequestTimer() local 32 (void)time(&now); in ReminderRequestTimer() 34 ReminderRequest::GetDurationSinceEpochInMilli(now) + countDownTimeInSeconds_ * ReminderRequest::MILLI_SECONDS); in ReminderRequestTimer() 104 time_t now; in UpdateTimeInfo() local 105 (void)time(&now); // unit is seconds. in UpdateTimeInfo() 106 whenToChangeSysTime_ = ReminderRequest::GetDurationSinceEpochInMilli(now); in UpdateTimeInfo()
|
H A D | reminder_request_calendar.cpp | 231 const uint16_t &settedYear, const uint8_t &settedMonth, const tm &now, const tm &target) const in GetNextDay() 248 nowTime.tm_year = now.tm_year; in GetNextDay() 249 nowTime.tm_mon = now.tm_mon; in GetNextDay() 250 nowTime.tm_mday = now.tm_mday; in GetNextDay() 251 nowTime.tm_hour = now.tm_hour; in GetNextDay() 252 nowTime.tm_min = now.tm_min; in GetNextDay() 253 nowTime.tm_sec = now.tm_sec; in GetNextDay() 267 bool ReminderRequestCalendar::CheckCalenderIsExpired(const uint64_t now) in CheckCalenderIsExpired() argument 272 if (now <= (lastStartDateTime_ + durationTime_) && now > in CheckCalenderIsExpired() 230 GetNextDay( const uint16_t &settedYear, const uint8_t &settedMonth, const tm &now, const tm &target) const GetNextDay() argument 293 uint64_t now = GetNowInstantMilli(); OnDateTimeChange() local 334 uint64_t now = GetNowInstantMilli(); IsPullUpService() local 348 uint64_t now = GetNowInstantMilli(); IsNeedNotification() local 385 time_t now; GetNextTriggerTime() local [all...] |
/base/telephony/sms_mms/utils/ |
H A D | sms_hisysevent.cpp | 64 std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()) in SetSmsBroadcastStartTime() 71 std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()) in JudgingSmsBroadcastTimeOut() 82 std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()) in SetCbBroadcastStartTime() 89 std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()) in JudgingCbBroadcastTimeOut() 100 std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()) in SetWapPushBroadcastStartTime() 107 std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()) in JudgingWapPushBroadcastTimeOut()
|
/base/notification/eventhandler/frameworks/eventhandler/src/ |
H A D | event_handler.cpp | 77 * now weak pointer is invalid, so these events become orphans. in ~EventHandler() 98 InnerEvent::TimePoint now = InnerEvent::Clock::now(); in SendEvent() local 99 event->SetSendTime(now); in SendEvent() 103 event->SetHandleTime(now + std::chrono::milliseconds(delayTime)); in SendEvent() 105 event->SetHandleTime(now); in SendEvent() 141 InnerEvent::TimePoint now = InnerEvent::Clock::now(); in PostTaskAtFront() local 142 event->SetSendTime(now); in PostTaskAtFront() 143 event->SetHandleTime(now); in PostTaskAtFront() 451 auto now = InnerEvent::Clock::now(); DistributeEvent() local 503 auto now = InnerEvent::Clock::now(); DistributeEvent() local 512 auto now = std::chrono::system_clock::now(); Dump() local [all...] |