/system/netd/include/ |
H A D | Stopwatch.h | 24 Stopwatch() : mStart(clock::now()) {} 29 return getElapsed(clock::now()); 33 const auto& now = clock::now(); local 34 float elapsed = getElapsed(now); 35 mStart = now; 44 float getElapsed(const time_point& now) const { 46 return (std::chrono::duration_cast<ms>(now - mStart)).count();
|
/system/security/keystore/ |
H A D | keystore_keymaster_enforcement.h | 42 time_t now = time(NULL); variable 43 if (now == static_cast<time_t>(-1)) { 46 } else if (now < 0) { 55 uint64_t now_date = static_cast<uint64_t>(now) * 1000 + 999; 60 time_t now = time(NULL); variable 61 if (now == static_cast<time_t>(-1)) { 64 } else if (now < 0) { 72 uint64_t now_date = static_cast<uint64_t>(now) * 1000;
|
H A D | confirmationui_rate_limiting.h | 72 auto then = Clock::now() - 24h; 88 auto now = Clock::now(); local 89 if (!slot.counter || slot.prompt_start <= now - getBackoff(slot.counter)) { 93 slot.prompt_start = now;
|
/system/security/keystore/tests/ |
H A D | confirmationui_rate_limiting_test.cpp | 68 static time_point now() noexcept { return sNow; } 79 auto now = std::chrono::steady_clock::now(); local 81 FakeClock::setNow(now); 93 auto now = std::chrono::steady_clock::now(); 95 FakeClock::setNow(now); 114 FakeClock::setNow(FakeClock::now() + 29s); 116 FakeClock::setNow(FakeClock::now() + 1s); 132 FakeClock::setNow((FakeClock::now() [all...] |
/system/core/base/ |
H A D | chrono_utils_test.cpp | 32 struct timespec now; local 33 clock_gettime(CLOCK_BOOTTIME, &now); 35 auto now_tp = boot_clock::time_point(std::chrono::seconds(now.tv_sec) + 36 std::chrono::nanoseconds(now.tv_nsec)); 40 // Tests (at least) the seconds accuracy of the boot_clock::now() method. 42 auto now = GetBootTimeSeconds(); local 44 std::chrono::duration_cast<std::chrono::seconds>(boot_clock::now().time_since_epoch()); 45 EXPECT_EQ(now, boot_seconds); 57 auto start = boot_clock::now(); 60 auto stop = boot_clock::now(); [all...] |
H A D | chrono_utils.cpp | 24 boot_clock::time_point boot_clock::now() { function in class:android::base::boot_clock
|
/system/bt/vendor_libs/test_vendor_lib/src/ |
H A D | device.cc | 37 std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now(); 40 ((now - time_stamp_) / advertising_interval_ms_) * 47 return ((now + scan_time) >= next_interval);
|
/system/core/liblog/ |
H A D | log_ratelimit.cpp | 76 time_t now = time(NULL); local 77 if ((now == (time_t)-1) || ((*last + seconds) > now)) { 82 *last = now;
|
H A D | log_time.cpp | 32 time_t now; local 35 now = tv_sec; 37 time(&now); 38 tv_sec = now; 45 ptm = localtime_r(&now, &tmBuf); 47 ptm = localtime(&now); 81 now = tv_sec; 83 ptm = localtime_r(&now, &tmBuf); 85 ptm = localtime(&now); 130 time(&now); [all...] |
/system/update_engine/update_manager/ |
H A D | real_time_provider_unittest.cc | 64 const Time now = CurrTime(); local 66 now.LocalExplode(&exploded); 74 fake_clock_.SetWallclockTime(now); 79 const Time now = CurrTime(); local 81 now.LocalExplode(&expected); 82 fake_clock_.SetWallclockTime(now);
|
H A D | real_time_provider.cc | 46 Time* now = new Time(); local 47 bool success = Time::FromLocalExploded(now_exp, now); 49 return now;
|
/system/core/base/include/android-base/ |
H A D | chrono_utils.h | 36 static time_point now(); 41 Timer() : start_(boot_clock::now()) {} 44 return std::chrono::duration_cast<std::chrono::milliseconds>(boot_clock::now() - start_);
|
/system/core/healthd/ |
H A D | healthd_mode_charger.cpp | 275 static void update_screen_state(charger* charger, int64_t now) { argument 279 if (!batt_anim->run || now < charger->next_screen_transition) return; 284 LOGV("[%" PRId64 "] leave screen off\n", now); 304 LOGV("[%" PRId64 "] animation done\n", now); 316 LOGV("[%" PRId64 "] animation starting\n", now); 344 LOGW("[%" PRId64 "] animation missing or unknown battery status\n", now); 345 charger->next_screen_transition = now + BATTERY_UNKNOWN_TIME; 351 charger->next_screen_transition = now + disp_time; 383 int64_t now = curr_time_ms(); local 393 if (down) charger->keys[code].timestamp = now; 421 process_key(charger* charger, int code, int64_t now) argument 468 handle_input_state(charger* charger, int64_t now) argument 475 handle_power_supply_state(charger* charger, int64_t now) argument 506 int64_t now = curr_time_ms(); local 534 int64_t now = curr_time_ms(); local [all...] |
/system/netd/server/dns/ |
H A D | DnsTlsDispatcher.cpp | 145 auto now = std::chrono::steady_clock::now(); local 149 xport->lastUsed = now; 150 cleanup(now); 157 void DnsTlsDispatcher::cleanup(std::chrono::time_point<std::chrono::steady_clock> now) { argument 160 if (now - mLastCleanup < IDLE_TIMEOUT) { 165 if (s->useCount == 0 && now - s->lastUsed > IDLE_TIMEOUT) { 171 mLastCleanup = now;
|
/system/core/logd/ |
H A D | FlushCommand.cpp | 58 log_time now(CLOCK_REALTIME); 59 if (((entry->mEnd + entry->mTimeout) > now) && 60 (now > entry->mEnd)) {
|
H A D | LogBuffer.h | 53 log_time now(CLOCK_REALTIME); 56 if (now.tv_sec >= EPOCH_PLUS_2_YEARS) { 61 if (now.tv_sec < EPOCH_PLUS_MINUTE) { 67 if ((cpu.tv_sec + EPOCH_PLUS_MINUTE) >= now.tv_sec) { 72 return mono.tv_sec < ((cpu.tv_sec + now.tv_sec) / 2);
|
/system/extras/libperfmgr/ |
H A D | RequestGroup.cc | 45 ReqTime now = std::chrono::steady_clock::now(); local 51 it->second - now);
|
H A D | NodeLooperThread.cc | 49 auto now = std::chrono::steady_clock::now(); local 53 ReqTime::max() - now) > a.timeout_ms) { 54 end_time = now + a.timeout_ms;
|
/system/core/debuggerd/ |
H A D | debuggerd_benchmark.cpp | 49 const auto begin = std::chrono::high_resolution_clock::now(); 53 auto now = std::chrono::high_resolution_clock::now(); local 55 auto diff = now - last; 60 last = now;
|
/system/libfmq/benchmarks/ |
H A D | msgq_benchmark_client.cpp | 128 std::chrono::high_resolution_clock::now(); 139 std::chrono::high_resolution_clock::now(); 162 std::chrono::high_resolution_clock::now(); 172 std::chrono::high_resolution_clock::now(); 196 std::chrono::high_resolution_clock::now(); 206 std::chrono::high_resolution_clock::now(); 229 std::chrono::high_resolution_clock::now(); 239 std::chrono::high_resolution_clock::now(); 261 std::chrono::high_resolution_clock::now(); 270 std::chrono::high_resolution_clock::now(); [all...] |
/system/core/fastboot/ |
H A D | util.cpp | 38 double now() { function
|
/system/extras/tests/icachetest/ |
H A D | icache_main.cpp | 107 auto now = std::chrono::steady_clock::now(); local 111 auto duration = std::chrono::steady_clock::now() - now;
|
/system/netd/server/ |
H A D | TcpSocketMonitor.cpp | 105 const auto now = steady_clock::now(); local 106 const auto d = duration_cast<milliseconds>(now - mLastPoll); 202 const auto now = steady_clock::now(); local 203 const auto tcpInfoReader = [this, now](Fwmark mark, const struct inet_diag_msg *sockinfo, 209 updateSocketStats(now, mark, sockinfo, tcpinfo, tcpinfoLen); 222 if (it->second.lastUpdate < now) { 250 mLastPoll = now; 275 void TcpSocketMonitor::updateSocketStats(time_point now, Fwmar [all...] |
/system/connectivity/wificond/tests/integration/ |
H A D | binder_dispatcher.cpp | 63 steady_clock::time_point start_time = steady_clock::now(); 68 convertDurationToMillis(start_time, steady_clock::now());
|
/system/extras/simpleperf/ |
H A D | cpu_hotplug_test.cpp | 243 auto start_time = std::chrono::steady_clock::now(); 245 auto end_time = std::chrono::steady_clock::now() + test_duration_for_long_tests; 250 if (cur_time + report_step < std::chrono::steady_clock::now()) { 253 std::chrono::steady_clock::now() - start_time); 257 cur_time = std::chrono::steady_clock::now(); 299 auto start_time = std::chrono::steady_clock::now(); 301 auto end_time = std::chrono::steady_clock::now() + test_duration_for_long_tests; 306 if (cur_time + report_step < std::chrono::steady_clock::now()) { 309 std::chrono::steady_clock::now() - start_time); 313 cur_time = std::chrono::steady_clock::now(); [all...] |