Home
last modified time | relevance | path

Searched refs:now (Results 1 – 25 of 293) sorted by relevance

12345678910>>...12

/system/security/keystore/tests/
Dconfirmationui_rate_limiting_test.cpp68 static time_point now() noexcept { return sNow; } in now() function in keystore::test::__anondc0fb8460111::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/
DStopwatch.h31 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/logging/liblog/
Dlog_time.cpp26 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/libbase/
Dchrono_utils_test.cpp32 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/security/keystore/
Dkeystore_keymaster_enforcement.h42 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()
/system/update_engine/update_manager/
Dreal_time_provider_unittest.cc64 const Time now = CurrTime(); in TEST_F() local
66 now.LocalExplode(&exploded); in TEST_F()
74 FakeSystemState::Get()->fake_clock()->SetWallclockTime(now); in TEST_F()
79 const Time now = CurrTime(); in TEST_F() local
81 now.LocalExplode(&expected); in TEST_F()
82 FakeSystemState::Get()->fake_clock()->SetWallclockTime(now); in TEST_F()
88 const Time now = CurrTime(); in TEST_F() local
90 now.LocalExplode(&expected); in TEST_F()
91 FakeSystemState::Get()->fake_clock()->SetWallclockTime(now); in TEST_F()
/system/core/healthd/
Dhealthd_mode_charger.cpp292 void Charger::UpdateScreenState(int64_t now) { in UpdateScreenState() argument
295 if (!batt_anim_.run || now < next_screen_transition_) return; in UpdateScreenState()
301 wait_batt_level_timestamp_ = now + MAX_BATT_LEVEL_WAIT_TIME; in UpdateScreenState()
302 LOGV("[%" PRId64 "] wait for battery capacity ready\n", now); in UpdateScreenState()
304 } else if (now <= wait_batt_level_timestamp_) { in UpdateScreenState()
320 LOGV("[%" PRId64 "] leave screen off\n", now); in UpdateScreenState()
342 LOGV("[%" PRId64 "] animation done\n", now); in UpdateScreenState()
356 LOGV("[%" PRId64 "] animation starting\n", now); in UpdateScreenState()
388 LOGW("[%" PRId64 "] animation missing or unknown battery status\n", now); in UpdateScreenState()
389 next_screen_transition_ = now + BATTERY_UNKNOWN_TIME; in UpdateScreenState()
[all …]
Dhealthd_mode_charger.h63 void UpdateScreenState(int64_t now);
67 void ProcessKey(int code, int64_t now);
68 void HandleInputState(int64_t now);
69 void HandlePowerSupplyState(int64_t now);
/system/chre/chpp/platform/linux/include/chpp/platform/
Dplatform_condition_variable.h55 struct timespec now; in chppConditionVariableTimedWait() local
56 clock_gettime(CLOCK_REALTIME, &now); in chppConditionVariableTimedWait()
57 now.tv_sec += timeoutS; in chppConditionVariableTimedWait()
58 now.tv_nsec += timeoutNs; in chppConditionVariableTimedWait()
59 return pthread_cond_timedwait(&cv->cond, &mutex->lock, &now) == 0; in chppConditionVariableTimedWait()
Dplatform_time.h32 struct timespec now; in chppGetCurrentTimeNs() local
33 clock_gettime(CLOCK_REALTIME, &now); in chppGetCurrentTimeNs()
34 return CHPP_TIMESPEC_TO_NS(now); in chppGetCurrentTimeNs()
/system/core/fs_mgr/
Dfile_wait.cpp42 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/
Dmsgq_benchmark_client.cpp128 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/bt/common/
Dstop_watch_legacy.cc69 auto now = stopwatch_logs[current_buffer_index].timestamp; in DumpStopWatchLog() local
71 now.time_since_epoch()) % in DumpStopWatchLog()
73 auto now_time_t = std::chrono::system_clock::to_time_t(now); in DumpStopWatchLog()
91 timestamp_(std::chrono::system_clock::now()), in StopWatchLegacy()
92 start_timestamp_(std::chrono::high_resolution_clock::now()) {} in StopWatchLegacy()
98 sw_log.end_timestamp = std::chrono::high_resolution_clock::now(); in ~StopWatchLegacy()
/system/bt/gd/common/
Dstop_watch.cc69 auto now = stopwatch_logs[current_buffer_index].timestamp; in DumpStopWatchLog() local
71 now.time_since_epoch()) % in DumpStopWatchLog()
73 auto now_time_t = std::chrono::system_clock::to_time_t(now); in DumpStopWatchLog()
92 timestamp_(std::chrono::system_clock::now()), in StopWatch()
93 start_timestamp_(std::chrono::high_resolution_clock::now()) {} in StopWatch()
99 sw_log.end_timestamp = std::chrono::high_resolution_clock::now(); in ~StopWatch()
/system/core/fs_mgr/libdm/
Dutility.cpp31 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/libbase/include/android-base/
Dchrono_utils.h35 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/core/debuggerd/
Ddebuggerd_benchmark.cpp49 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/bt/vendor_libs/test_vendor_lib/model/controller/
Dle_advertiser.cc77 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/netd/server/
DTcpSocketMonitor.cpp110 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/
Dperformance_test_logger.py26 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())
/system/security/keystore2/src/
Dentropy.rs33 let now = Instant::now(); in register_feeder() localVariable
36 Some(last) => now.duration_since(last) > Duration::from_secs(MIN_FEED_INTERVAL_SECS), in register_feeder()
39 info.last_feed = Some(now); in register_feeder()
Dwatchdog.rs75 let now = Instant::now(); in update_overdue_and_find_next_timeout() localVariable
79 let timeout = r.deadline.saturating_duration_since(now); in update_overdue_and_find_next_timeout()
112 self.last_report = Instant::now(); in log_report()
116 let now = Instant::now(); in log_report() localVariable
118 if r.deadline.saturating_duration_since(now) == Duration::new(0, 0) { in log_report()
180 last_report: Instant::now(), in new()
193 let deadline = Instant::now().checked_add(timeout); in watch_with_optional()
228 let record = Record { started: Instant::now(), deadline, callback }; in arm()
/system/chre/core/
Devent.cc24 Milliseconds now = SystemTime::getMonotonicTime(); in getTimeMillis() local
28 return static_cast<uint16_t>(now.getMilliseconds()); in getTimeMillis()
/system/extras/simpleperf/
Dcpu_hotplug_test.cpp243 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/
Dthread_performance_test.cc123 std::chrono::steady_clock::now(); in TEST_F()
133 std::chrono::steady_clock::now(); in TEST_F()
168 std::chrono::steady_clock::now(); in TEST_F()
178 std::chrono::steady_clock::now(); in TEST_F()
214 std::chrono::steady_clock::now(); in TEST_F()
224 std::chrono::steady_clock::now(); in TEST_F()
257 std::chrono::steady_clock::now(); in TEST_F()
265 std::chrono::steady_clock::now(); in TEST_F()
305 std::chrono::steady_clock::now(); in TEST_F()
315 std::chrono::steady_clock::now(); in TEST_F()
[all …]

12345678910>>...12