/system/security/keystore/tests/ |
D | confirmationui_rate_limiting_test.cpp | 68 static time_point now() noexcept { return sNow; } in now() function in keystore::test::__anon362dafdf0111::FakeClock 79 auto now = std::chrono::steady_clock::now(); in TEST() local 81 FakeClock::setNow(now); in TEST() 93 auto now = std::chrono::steady_clock::now(); in TEST() local 95 FakeClock::setNow(now); in TEST() 114 FakeClock::setNow(FakeClock::now() + 29s); in TEST() 116 FakeClock::setNow(FakeClock::now() + 1s); in TEST() 132 FakeClock::setNow((FakeClock::now() + 60s * (1ULL << (i - 6))) - 1s); in TEST() 134 FakeClock::setNow(FakeClock::now() + 1s); in TEST() 150 FakeClock::setNow(FakeClock::now() + 24h - 1s); in TEST() [all …]
|
/system/netd/libnetdutils/include/netdutils/ |
D | Stopwatch.h | 31 Stopwatch() : mStart(clock::now()) {} in Stopwatch() 34 int64_t timeTakenUs() const { return getElapsedUs(clock::now()); } in timeTakenUs() 36 const auto& now = clock::now(); in getTimeAndResetUs() local 37 int64_t elapsed = getElapsedUs(now); in getTimeAndResetUs() 38 mStart = now; in getTimeAndResetUs() 45 int64_t getElapsedUs(const time_point& now) const { in getElapsedUs() argument 46 return (std::chrono::duration_cast<std::chrono::microseconds>(now - mStart)).count(); in getElapsedUs()
|
/system/core/liblog/ |
D | log_time.cpp | 26 time_t now; in strptime() local 29 now = tv_sec; in strptime() 31 time(&now); in strptime() 32 tv_sec = now; in strptime() 39 ptm = localtime_r(&now, &tmBuf); in strptime() 41 ptm = localtime(&now); in strptime() 75 now = tv_sec; in strptime() 77 ptm = localtime_r(&now, &tmBuf); in strptime() 79 ptm = localtime(&now); in strptime() 124 time(&now); in strptime() [all …]
|
/system/security/keystore/ |
D | keystore_keymaster_enforcement.h | 42 time_t now = time(nullptr); in activation_date_valid() local 43 if (now == static_cast<time_t>(-1)) { in activation_date_valid() 46 } else if (now < 0) { in activation_date_valid() 55 uint64_t now_date = static_cast<uint64_t>(now) * 1000 + 999; in activation_date_valid() 60 time_t now = time(nullptr); in expiration_date_passed() local 61 if (now == static_cast<time_t>(-1)) { in expiration_date_passed() 64 } else if (now < 0) { in expiration_date_passed() 72 uint64_t now_date = static_cast<uint64_t>(now) * 1000; in expiration_date_passed()
|
D | confirmationui_rate_limiting.h | 72 auto then = Clock::now() - 24h; in doGC() 88 auto now = Clock::now(); in tryPrompt() local 89 if (!slot.counter || slot.prompt_start <= now - getBackoff(slot.counter)) { in tryPrompt() 93 slot.prompt_start = now; in tryPrompt()
|
/system/libbase/ |
D | chrono_utils_test.cpp | 32 struct timespec now; in GetBootTimeSeconds() local 33 clock_gettime(CLOCK_BOOTTIME, &now); in GetBootTimeSeconds() 35 auto now_tp = boot_clock::time_point(std::chrono::seconds(now.tv_sec) + in GetBootTimeSeconds() 36 std::chrono::nanoseconds(now.tv_nsec)); in GetBootTimeSeconds() 42 auto now = GetBootTimeSeconds(); in TEST() local 44 std::chrono::duration_cast<std::chrono::seconds>(boot_clock::now().time_since_epoch()); in TEST() 45 EXPECT_EQ(now, boot_seconds); in TEST() 57 auto start = boot_clock::now(); in TEST() 60 auto stop = boot_clock::now(); in TEST()
|
/system/update_engine/update_manager/ |
D | real_time_provider_unittest.cc | 64 const Time now = CurrTime(); in TEST_F() local 66 now.LocalExplode(&exploded); in TEST_F() 74 fake_clock_.SetWallclockTime(now); in TEST_F() 79 const Time now = CurrTime(); in TEST_F() local 81 now.LocalExplode(&expected); in TEST_F() 82 fake_clock_.SetWallclockTime(now); in TEST_F() 88 const Time now = CurrTime(); in TEST_F() local 90 now.LocalExplode(&expected); in TEST_F() 91 fake_clock_.SetWallclockTime(now); in TEST_F()
|
D | update_time_restrictions_policy_impl.cc | 55 WeeklyTime now = WeeklyTime::FromTime(*curr_date); in UpdateCanBeApplied() local 56 now.AddTime(TimeDelta::FromHours(*curr_hour) + in UpdateCanBeApplied() 65 if (interval.InRange(now)) { in UpdateCanBeApplied()
|
/system/core/healthd/ |
D | healthd_mode_charger.cpp | 283 void Charger::UpdateScreenState(int64_t now) { in UpdateScreenState() argument 286 if (!batt_anim_.run || now < next_screen_transition_) return; in UpdateScreenState() 292 wait_batt_level_timestamp_ = now + MAX_BATT_LEVEL_WAIT_TIME; in UpdateScreenState() 293 LOGV("[%" PRId64 "] wait for battery capacity ready\n", now); in UpdateScreenState() 295 } else if (now <= wait_batt_level_timestamp_) { in UpdateScreenState() 311 LOGV("[%" PRId64 "] leave screen off\n", now); in UpdateScreenState() 333 LOGV("[%" PRId64 "] animation done\n", now); in UpdateScreenState() 347 LOGV("[%" PRId64 "] animation starting\n", now); in UpdateScreenState() 379 LOGW("[%" PRId64 "] animation missing or unknown battery status\n", now); in UpdateScreenState() 380 next_screen_transition_ = now + BATTERY_UNKNOWN_TIME; in UpdateScreenState() [all …]
|
D | healthd_mode_charger.h | 58 void UpdateScreenState(int64_t now); 62 void ProcessKey(int code, int64_t now); 63 void HandleInputState(int64_t now); 64 void HandlePowerSupplyState(int64_t now);
|
/system/core/fs_mgr/ |
D | file_wait.cpp | 42 auto start_time = std::chrono::steady_clock::now(); in PollForFile() 49 auto now = std::chrono::steady_clock::now(); in PollForFile() local 50 auto time_elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now - start_time); in PollForFile() 56 auto start_time = std::chrono::steady_clock::now(); in PollForFileDeleted() 63 auto now = std::chrono::steady_clock::now(); in PollForFileDeleted() local 64 auto time_elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now - start_time); in PollForFileDeleted() 97 start_time_(std::chrono::steady_clock::now()), in OneShotInotify() 209 auto remaining = (std::chrono::steady_clock::now() - start_time_); in RemainingMs()
|
/system/libfmq/benchmarks/ |
D | msgq_benchmark_client.cpp | 128 std::chrono::high_resolution_clock::now(); in TEST_F() 139 std::chrono::high_resolution_clock::now(); in TEST_F() 162 std::chrono::high_resolution_clock::now(); in TEST_F() 172 std::chrono::high_resolution_clock::now(); in TEST_F() 196 std::chrono::high_resolution_clock::now(); in TEST_F() 206 std::chrono::high_resolution_clock::now(); in TEST_F() 229 std::chrono::high_resolution_clock::now(); in TEST_F() 239 std::chrono::high_resolution_clock::now(); in TEST_F() 261 std::chrono::high_resolution_clock::now(); in TEST_F() 270 std::chrono::high_resolution_clock::now(); in TEST_F() [all …]
|
/system/core/fs_mgr/libdm/ |
D | utility.cpp | 31 auto start_time = std::chrono::steady_clock::now(); in WaitForCondition() 39 auto now = std::chrono::steady_clock::now(); in WaitForCondition() local 40 auto time_elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now - start_time); in WaitForCondition()
|
/system/bt/vendor_libs/test_vendor_lib/model/controller/ |
D | le_advertiser.cc | 77 last_le_advertisement_ = std::chrono::steady_clock::now() - interval_; in Enable() 85 last_le_advertisement_ = std::chrono::steady_clock::now(); in EnableExtended() 87 ending_time_ = std::chrono::steady_clock::now() + duration; in EnableExtended() 100 LeAdvertiser::GetAdvertisement(std::chrono::steady_clock::time_point now) { in GetAdvertisement() argument 105 if (now - last_le_advertisement_ < interval_) { in GetAdvertisement() 109 if (last_le_advertisement_ < ending_time_ && ending_time_ < now) { in GetAdvertisement() 114 last_le_advertisement_ = now; in GetAdvertisement()
|
/system/core/debuggerd/ |
D | debuggerd_benchmark.cpp | 49 const auto begin = std::chrono::high_resolution_clock::now(); in GetMaximumPause() 53 auto now = std::chrono::high_resolution_clock::now(); in GetMaximumPause() local 55 auto diff = now - last; in GetMaximumPause() 60 last = now; in GetMaximumPause()
|
/system/libbase/include/android-base/ |
D | chrono_utils.h | 35 static time_point now(); 40 Timer() : start_(boot_clock::now()) {} in Timer() 43 return std::chrono::duration_cast<std::chrono::milliseconds>(boot_clock::now() - start_); in duration()
|
/system/netd/server/ |
D | TcpSocketMonitor.cpp | 110 const auto now = steady_clock::now(); in dump() local 111 const auto d = duration_cast<milliseconds>(now - mLastPoll); in dump() 205 const auto now = steady_clock::now(); in poll() local 206 const auto tcpInfoReader = [this, now](Fwmark mark, const struct inet_diag_msg *sockinfo, in poll() 212 updateSocketStats(now, mark, sockinfo, tcpinfo, tcpinfoLen); in poll() 225 if (it->second.lastUpdate < now) { in poll() 253 mLastPoll = now; in poll() 278 void TcpSocketMonitor::updateSocketStats(time_point now, Fwmark mark, in updateSocketStats() argument 300 .lastUpdate = now, in updateSocketStats()
|
/system/bt/gd/cert/ |
D | performance_test_logger.py | 26 self.base_timepoint = datetime.now() 35 self.single_points[label].append(datetime.now()) 40 self.start_interval_points[label].append(datetime.now()) 45 self.end_interval_points[label].append(datetime.now())
|
D | event_stream.py | 189 end_time = datetime.now() + timeout 190 while len(event_list) <= at_most_times and datetime.now() < end_time: 206 remaining = end_time - datetime.now() 218 end_time = datetime.now() + timeout 219 while len(event_list) < at_least_times and datetime.now() < end_time: 242 end_time = datetime.now() + timeout 243 while len(pending_matches) > 0 and datetime.now() < end_time: 272 end_time = datetime.now() + timeout 273 while event is None and datetime.now() < end_time:
|
/system/bt/gd/os/ |
D | log.h | 53 …auto now = std::chrono::system_clock::now(); … 54 …auto now_ms = std::chrono::time_point_cast<std::chrono::milliseconds>(now); … 55 …auto now_t = std::chrono::system_clock::to_time_t(now); …
|
/system/extras/simpleperf/ |
D | cpu_hotplug_test.cpp | 243 auto start_time = std::chrono::steady_clock::now(); in TEST() 245 auto end_time = std::chrono::steady_clock::now() + test_duration_for_long_tests; in TEST() 250 if (cur_time + report_step < std::chrono::steady_clock::now()) { in TEST() 253 std::chrono::steady_clock::now() - start_time); in TEST() 257 cur_time = std::chrono::steady_clock::now(); in TEST() 300 auto start_time = std::chrono::steady_clock::now(); in TEST() 302 auto end_time = std::chrono::steady_clock::now() + test_duration_for_long_tests; in TEST() 307 if (cur_time + report_step < std::chrono::steady_clock::now()) { in TEST() 310 std::chrono::steady_clock::now() - start_time); in TEST() 314 cur_time = std::chrono::steady_clock::now(); in TEST() [all …]
|
/system/bt/common/test/ |
D | thread_performance_test.cc | 122 std::chrono::steady_clock::now(); in TEST_F() 132 std::chrono::steady_clock::now(); in TEST_F() 167 std::chrono::steady_clock::now(); in TEST_F() 177 std::chrono::steady_clock::now(); in TEST_F() 213 std::chrono::steady_clock::now(); in TEST_F() 223 std::chrono::steady_clock::now(); in TEST_F() 256 std::chrono::steady_clock::now(); in TEST_F() 264 std::chrono::steady_clock::now(); in TEST_F() 304 std::chrono::steady_clock::now(); in TEST_F() 314 std::chrono::steady_clock::now(); in TEST_F() [all …]
|
/system/extras/libperfmgr/tests/ |
D | RequestGroupTest.cc | 41 auto start = std::chrono::steady_clock::now(); in TEST() 63 ReqTime::max() - std::chrono::steady_clock::now()); in TEST() 73 auto start = std::chrono::steady_clock::now(); in TEST() 89 auto start = std::chrono::steady_clock::now(); in TEST() 118 auto start = std::chrono::steady_clock::now(); in TEST() 133 auto start = std::chrono::steady_clock::now(); in TEST() 150 auto start = std::chrono::steady_clock::now(); in TEST()
|
/system/extras/libperfmgr/ |
D | RequestGroup.cc | 45 ReqTime now = std::chrono::steady_clock::now(); in GetExpireTime() local 51 it->second - now); in GetExpireTime()
|
D | NodeLooperThread.cc | 49 auto now = std::chrono::steady_clock::now(); in Request() local 53 ReqTime::max() - now) > a.timeout_ms) { in Request() 54 end_time = now + a.timeout_ms; in Request()
|