Home
last modified time | relevance | path

Searched refs:chrono (Results 1 – 25 of 364) sorted by relevance

12345678910>>...15

/packages/modules/Bluetooth/system/common/test/
Dthread_performance_test.cc123 std::chrono::steady_clock::time_point start_time = in TEST_F()
124 std::chrono::steady_clock::now(); in TEST_F()
133 std::chrono::steady_clock::time_point end_time = in TEST_F()
134 std::chrono::steady_clock::now(); in TEST_F()
135 std::chrono::milliseconds duration = in TEST_F()
136 std::chrono::duration_cast<std::chrono::milliseconds>(end_time - in TEST_F()
168 std::chrono::steady_clock::time_point start_time = in TEST_F()
169 std::chrono::steady_clock::now(); in TEST_F()
178 std::chrono::steady_clock::time_point end_time = in TEST_F()
179 std::chrono::steady_clock::now(); in TEST_F()
[all …]
/packages/services/Car/cpp/watchdog/server/src/
DWatchdogPerfService.h60 constexpr std::chrono::seconds kDefaultPostSystemEventDurationSec = 30s;
61 constexpr std::chrono::seconds kDefaultWakeUpEventDurationSec = 30s;
62 constexpr std::chrono::seconds kDefaultUserSwitchTimeoutSec = 30s;
63 constexpr std::chrono::nanoseconds kPrevUnsentResourceStatsMaxDurationNs = 10min;
76 std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>;
85 std::chrono::milliseconds mBoottimeIntervalMillis = std::chrono::milliseconds(0);
86 std::chrono::milliseconds mPeriodicIntervalMillis = std::chrono::milliseconds(0);
87 std::chrono::milliseconds mUserSwitchIntervalMillis = std::chrono::milliseconds(0);
88 std::chrono::milliseconds mWakeUpIntervalMillis = std::chrono::milliseconds(0);
89 std::chrono::milliseconds mCustomIntervalMillis = std::chrono::milliseconds(0);
[all …]
DWatchdogPerfService.cpp62 const std::chrono::nanoseconds kPrevUnsentResourceStatsDelayNs = 3s;
64 const std::chrono::nanoseconds kMinEventInterval = 1s;
65 const std::chrono::seconds kDefaultSystemEventCollectionInterval = 1s;
66 const std::chrono::seconds kDefaultPeriodicCollectionInterval = 20s;
67 const std::chrono::seconds kDefaultPeriodicMonitorInterval = 5s;
68 const std::chrono::nanoseconds kCustomCollectionInterval = 10s;
69 const std::chrono::nanoseconds kCustomCollectionDuration = 30min;
90 Result<std::chrono::seconds> parseSecondsFlag(const char** args, uint32_t numArgs, size_t pos) { in parseSecondsFlag()
98 return std::chrono::seconds(value); in parseSecondsFlag()
180 std::chrono::duration_cast<std::chrono::seconds>(pollingIntervalNs).count(); in toString()
[all …]
/packages/modules/Bluetooth/system/common/
Drepeating_timer_unittest.cc56 std::this_thread::sleep_for(std::chrono::milliseconds(sleep_ms)); in SleepAndIncreaseCounter()
60 void VerifyDelayTimeAndSleep(std::chrono::steady_clock::time_point start_time, in VerifyDelayTimeAndSleep()
64 auto end_time = std::chrono::steady_clock::now(); in VerifyDelayTimeAndSleep()
65 auto actual_delay = std::chrono::duration_cast<std::chrono::milliseconds>( in VerifyDelayTimeAndSleep()
73 std::this_thread::sleep_for(std::chrono::milliseconds(task_length_ms)); in VerifyDelayTimeAndSleep()
83 auto start_time = std::chrono::steady_clock::now(); in VerifyMultipleDelayedTasks()
90 std::chrono::milliseconds(interval_between_tasks_ms)); in VerifyMultipleDelayedTasks()
147 std::chrono::milliseconds(delay_ms)); in TEST_F()
163 std::chrono::milliseconds(interval_ms))); in TEST_F()
164 std::this_thread::sleep_for(std::chrono::milliseconds(delay_error_ms)); in TEST_F()
[all …]
Dstop_watch_legacy.cc44 std::chrono::duration_cast<std::chrono::microseconds>( in RecordLog()
72 auto millis = std::chrono::duration_cast<std::chrono::milliseconds>( in DumpStopWatchLog()
75 auto now_time_t = std::chrono::system_clock::to_time_t(now); in DumpStopWatchLog()
82 std::chrono::duration_cast<std::chrono::microseconds>( in DumpStopWatchLog()
93 timestamp_(std::chrono::system_clock::now()), in StopWatchLegacy()
94 start_timestamp_(std::chrono::high_resolution_clock::now()) {} in StopWatchLegacy()
100 sw_log.end_timestamp = std::chrono::high_resolution_clock::now(); in ~StopWatchLegacy()
Dstop_watch_legacy.h26 std::chrono::system_clock::time_point timestamp;
27 std::chrono::high_resolution_clock::time_point start_timestamp;
28 std::chrono::high_resolution_clock::time_point end_timestamp;
40 std::chrono::system_clock::time_point timestamp_;
41 std::chrono::high_resolution_clock::time_point start_timestamp_;
/packages/modules/Connectivity/staticlibs/netd/libnetdutils/
DBackoffSequenceTest.cpp133 auto backoff = BackoffSequence<std::chrono::seconds>::Builder() in TEST()
134 .withInitialRetransmissionTime(std::chrono::seconds(0)) in TEST()
145 auto backoff = BackoffSequence<std::chrono::milliseconds>::Builder() in TEST()
146 .withInitialRetransmissionTime(std::chrono::milliseconds(5)) in TEST()
147 .withMaximumRetransmissionDuration(std::chrono::milliseconds(3)) in TEST()
150 EXPECT_EQ(std::chrono::milliseconds(3), backoff.getNextTimeout()); in TEST()
158 auto backoff = BackoffSequence<std::chrono::hours>::Builder() in TEST()
159 .withInitialRetransmissionTime(std::chrono::hours(5)) in TEST()
160 .withMaximumRetransmissionDuration(std::chrono::hours(5)) in TEST()
163 EXPECT_EQ(std::chrono::hours(5), backoff.getNextTimeout()); in TEST()
[all …]
/packages/modules/Bluetooth/system/gd/os/
Dalarm_benchmark.cc60 auto end_time = std::chrono::steady_clock::now(); in AlarmSleepAndCountDelayedTime()
61 …auto duration_since_start = std::chrono::duration_cast<std::chrono::milliseconds>(end_time - start… in AlarmSleepAndCountDelayedTime()
64 std::this_thread::sleep_for(std::chrono::milliseconds(task_length_)); in AlarmSleepAndCountDelayedTime()
80 std::chrono::time_point<std::chrono::steady_clock> start_time_;
90 auto start_time_point = std::chrono::steady_clock::now(); in BENCHMARK_DEFINE_F()
93 std::chrono::milliseconds(milliseconds)); in BENCHMARK_DEFINE_F()
95 auto end_time_point = std::chrono::steady_clock::now(); in BENCHMARK_DEFINE_F()
96 …auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(end_time_point - start_time_p… in BENCHMARK_DEFINE_F()
118 start_time_ = std::chrono::steady_clock::now(); in BENCHMARK_DEFINE_F()
123 std::chrono::milliseconds(task_interval_)); in BENCHMARK_DEFINE_F()
/packages/modules/Bluetooth/system/gd/os/linux_generic/
Dalarm_unittest.cc74 …BindOnce(&std::promise<void>::set_value, common::Unretained(&promise)), std::chrono::milliseconds(… in TEST_F()
81 …alarm_->Schedule(BindOnce([]() { ASSERT_TRUE(false) << "Should not happen"; }), std::chrono::milli… in TEST_F()
83 std::this_thread::sleep_for(std::chrono::milliseconds(5)); in TEST_F()
98 std::chrono::milliseconds(1)); in TEST_F()
100 ASSERT_EQ(std::future_status::ready, future.wait_for(std::chrono::seconds(1))); in TEST_F()
105 …alarm_->Schedule(BindOnce([]() { ASSERT_TRUE(false) << "Should not happen"; }), std::chrono::milli… in TEST_F()
109 …BindOnce(&std::promise<void>::set_value, common::Unretained(&promise)), std::chrono::milliseconds(… in TEST_F()
115 …alarm_->Schedule(BindOnce([]() { ASSERT_TRUE(false) << "Should not happen"; }), std::chrono::milli… in TEST_F()
117 std::this_thread::sleep_for(std::chrono::milliseconds(10)); in TEST_F()
148 std::chrono::milliseconds(10)); in TEST_F()
[all …]
Drepeating_alarm_unittest.cc52 auto start_time = std::chrono::steady_clock::now(); in VerifyMultipleDelayedTasks()
64 std::chrono::milliseconds(interval_between_tasks_ms)); in VerifyMultipleDelayedTasks()
72 std::chrono::steady_clock::time_point /* start_time */, in verify_delayed_tasks()
105 …common::Bind(&std::promise<void>::set_value, common::Unretained(&promise)), std::chrono::milliseco… in TEST_F()
113 alarm_->Schedule(should_not_happen_, std::chrono::milliseconds(10)); in TEST_F()
129 std::chrono::milliseconds(1)); in TEST_F()
131 ASSERT_EQ(std::future_status::ready, future.wait_for(std::chrono::seconds(1))); in TEST_F()
135 alarm_->Schedule(should_not_happen_, std::chrono::milliseconds(1)); in TEST_F()
139 …common::Bind(&std::promise<void>::set_value, common::Unretained(&promise)), std::chrono::milliseco… in TEST_F()
141 ASSERT_EQ(std::future_status::ready, future.wait_for(std::chrono::seconds(1))); in TEST_F()
[all …]
/packages/modules/Bluetooth/system/gd/
Dmodule_gdx_unittest.cc97 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_handler_protected_method()
106 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_main_external_function()
115 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_main()
125 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_main_repost()
140 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_main_recurse()
149 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_jni_external_function()
158 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_jni()
168 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_jni_repost()
183 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_jni_recurse()
278 future.wait_for(std::chrono::milliseconds(sync_timeout_in_ms)); in sync_main_handler()
[all …]
/packages/modules/Bluetooth/tools/rootcanal/model/controller/
Dacl_connection.cc35 last_packet_timestamp_(std::chrono::steady_clock::now()), in AclConnection()
36 timeout_(std::chrono::seconds(3)) {} in AclConnection()
55 last_packet_timestamp_ = std::chrono::steady_clock::now(); in ResetLinkTimer()
58 std::chrono::steady_clock::duration AclConnection::TimeUntilNearExpiring() in TimeUntilNearExpiring()
61 std::chrono::steady_clock::now(); in TimeUntilNearExpiring()
65 return TimeUntilNearExpiring() < std::chrono::steady_clock::duration::zero(); in IsNearExpiring()
68 std::chrono::steady_clock::duration AclConnection::TimeUntilExpired() const { in TimeUntilExpired()
69 return (last_packet_timestamp_ + timeout_) - std::chrono::steady_clock::now(); in TimeUntilExpired()
73 return TimeUntilExpired() < std::chrono::steady_clock::duration::zero(); in HasExpired()
/packages/modules/Bluetooth/system/gd/hci/
Dle_address_manager.h31 constexpr std::chrono::milliseconds kUnregisterSyncTimeoutInMs = std::chrono::milliseconds(10);
65 std::chrono::milliseconds minimum_rotation_time,
66 std::chrono::milliseconds maximum_rotation_time);
72 std::chrono::milliseconds minimum_rotation_time,
73 std::chrono::milliseconds maximum_rotation_time);
82 std::chrono::milliseconds timeout = kUnregisterSyncTimeoutInMs);
100 std::chrono::milliseconds GetNextPrivateAddressIntervalMs();
109 std::chrono::milliseconds minimum_rotation_time_;
110 std::chrono::milliseconds maximum_rotation_time_;
133 std::chrono::milliseconds minimum_rotation_time;
[all …]
/packages/modules/Bluetooth/system/gd/common/
Dstop_watch.cc45 static_cast<size_t>(std::chrono::duration_cast<std::chrono::microseconds>( in RecordLog()
73 auto millis = std::chrono::duration_cast<std::chrono::milliseconds>( in DumpStopWatchLog()
76 auto now_time_t = std::chrono::system_clock::to_time_t(now); in DumpStopWatchLog()
84 static_cast<size_t>(std::chrono::duration_cast<std::chrono::microseconds>( in DumpStopWatchLog()
95 timestamp_(std::chrono::system_clock::now()), in StopWatch()
96 start_timestamp_(std::chrono::high_resolution_clock::now()) {} in StopWatch()
102 sw_log.end_timestamp = std::chrono::high_resolution_clock::now(); in ~StopWatch()
Dstop_watch.h26 std::chrono::system_clock::time_point timestamp;
27 std::chrono::high_resolution_clock::time_point start_timestamp;
28 std::chrono::high_resolution_clock::time_point end_timestamp;
40 std::chrono::system_clock::time_point timestamp_;
41 std::chrono::high_resolution_clock::time_point start_timestamp_;
/packages/modules/DnsResolver/
DDnsTlsDispatcher.h104 std::chrono::time_point<std::chrono::steady_clock> lastUsed GUARDED_BY(sLock);
115 std::chrono::milliseconds timeout() const { return mTimeout; } in timeout()
145 const std::chrono::milliseconds mTimeout;
158 std::chrono::time_point<std::chrono::steady_clock> mLastCleanup GUARDED_BY(sLock);
163 void maybeCleanup(std::chrono::time_point<std::chrono::steady_clock> now) REQUIRES(sLock);
167 void cleanup(std::chrono::time_point<std::chrono::steady_clock> now,
/packages/modules/Bluetooth/system/gd/hal/
Dhci_hal_fake.h64 std::chrono::milliseconds timeout = std::chrono::seconds(1));
67 std::chrono::milliseconds timeout = std::chrono::seconds(1));
70 std::chrono::milliseconds timeout = std::chrono::seconds(1));
73 std::chrono::milliseconds timeout = std::chrono::seconds(1));
Dhci_hal_android_test.cc33 static std::chrono::milliseconds initialization_delay;
43 [callbacks](std::chrono::milliseconds delay) { in initialize()
66 std::chrono::milliseconds TestBackend::initialization_delay = std::chrono::milliseconds(0);
103 TestBackend::initialization_delay = std::chrono::milliseconds(100); in TEST_F()
104 const auto t0 = std::chrono::steady_clock::now(); in TEST_F()
106 const auto t1 = std::chrono::steady_clock::now(); in TEST_F()
109 TestBackend::initialization_delay = std::chrono::milliseconds(0); in TEST_F()
/packages/services/Car/cpp/watchdog/server/tests/
DIoOveruseMonitorTest.cpp72 constexpr std::chrono::seconds kTestMonitorInterval = 5s;
73 constexpr std::chrono::seconds kMaxWaitSeconds = 5s;
367 auto currentTime = std::chrono::time_point_cast<std::chrono::milliseconds>( in TEST_F()
368 std::chrono::system_clock::now()); in TEST_F()
472 currentTime += std::chrono::hours(24); // Change collection time to next day. in TEST_F()
532 auto currentTime = std::chrono::time_point_cast<std::chrono::milliseconds>( in TEST_F()
533 std::chrono::system_clock::now()); in TEST_F()
593 ->onPeriodicCollection(std::chrono::time_point_cast<std::chrono::milliseconds>( in TEST_F()
594 std::chrono::system_clock::now()), in TEST_F()
611 auto currentTime = std::chrono::time_point_cast<std::chrono::milliseconds>( in TEST_F()
[all …]
/packages/modules/Bluetooth/system/test/headless/
Dlog.h33 extern std::chrono::system_clock::time_point _prev;
52 auto _now = std::chrono::system_clock::now(); \
54 std::chrono::duration_cast<std::chrono::microseconds>(_now - _prev); \
57 std::chrono::time_point_cast<std::chrono::microseconds>(_now); \
58 auto _now_t = std::chrono::system_clock::to_time_t(_now); \
Dstopwatch.h29 start_(std::chrono::duration_cast<std::chrono::milliseconds>( in Stopwatch()
30 std::chrono::system_clock::now().time_since_epoch()) in Stopwatch()
34 uint64_t now = std::chrono::duration_cast<std::chrono::milliseconds>( in LapMs()
35 std::chrono::system_clock::now().time_since_epoch()) in LapMs()
/packages/services/Car/cpp/computepipe/runner/graph/
DGrpcGraph.cpp95 context.set_deadline(std::chrono::system_clock::now() + in initialize()
96 std::chrono::milliseconds(kRpcDeadlineMilliseconds)); in initialize()
141 context.set_deadline(std::chrono::system_clock::now() + in handleConfigPhase()
142 std::chrono::milliseconds(kRpcDeadlineMilliseconds)); in handleConfigPhase()
196 context.set_deadline(std::chrono::system_clock::now() + in handleExecutionPhase()
197 std::chrono::milliseconds(kRpcDeadlineMilliseconds)); in handleExecutionPhase()
235 context.set_deadline(std::chrono::system_clock::now() + in handleStopWithFlushPhase()
236 std::chrono::milliseconds(kRpcDeadlineMilliseconds)); in handleStopWithFlushPhase()
278 context.set_deadline(std::chrono::system_clock::now() + in handleStopImmediatePhase()
279 std::chrono::milliseconds(kRpcDeadlineMilliseconds)); in handleStopImmediatePhase()
[all …]
/packages/modules/Bluetooth/tools/rootcanal/model/setup/
Dasync_manager.cc293 AsyncTaskId ExecAsync(AsyncUserId user_id, std::chrono::milliseconds delay, in ExecAsync()
296 std::chrono::steady_clock::now() + delay, callback, user_id)); in ExecAsync()
300 std::chrono::milliseconds delay, in ExecAsyncPeriodically()
301 std::chrono::milliseconds period, in ExecAsyncPeriodically()
304 std::chrono::steady_clock::now() + delay, period, callback, user_id)); in ExecAsyncPeriodically()
362 Task(std::chrono::steady_clock::time_point time, in Task()
363 std::chrono::milliseconds period, const TaskCallback& callback, in Task()
371 Task(std::chrono::steady_clock::time_point time, in Task()
389 std::chrono::steady_clock::time_point time;
391 std::chrono::milliseconds period{};
[all …]
Dtest_model.h44 std::function<AsyncTaskId(AsyncUserId, std::chrono::milliseconds,
47 std::function<AsyncTaskId(AsyncUserId, std::chrono::milliseconds,
48 std::chrono::milliseconds, const TaskCallback&)>
108 void SetTimerPeriod(std::chrono::milliseconds new_period);
132 std::function<AsyncTaskId(AsyncUserId, std::chrono::milliseconds,
135 std::function<AsyncTaskId(AsyncUserId, std::chrono::milliseconds,
136 std::chrono::milliseconds, const TaskCallback&)>
145 std::chrono::milliseconds timer_period_{};
/packages/services/Car/cpp/evs/manager/aidl/stats/src/
DStatsCollector.cpp123 << std::chrono::duration_cast<std::chrono::seconds>(info->interval).count() in handleCollectionEvent()
125 << std::chrono::duration_cast<std::chrono::seconds>(kMinCollectionInterval).count() in handleCollectionEvent()
249 Result<void> StatsCollector::startCustomCollection(std::chrono::nanoseconds interval, in startCustomCollection()
250 std::chrono::nanoseconds maxDuration) { in startCustomCollection()
254 << std::chrono::duration_cast<std::chrono::milliseconds>(kMinCollectionInterval) in startCustomCollection()
262 << std::chrono::duration_cast<std::chrono::milliseconds>( in startCustomCollection()
323 std::chrono::duration_cast<std::chrono::seconds>(mCustomCollectionInfo.interval) in stopCustomCollection()
420 std::chrono::duration_cast<std::chrono::seconds>(mPeriodicCollectionInfo.interval) in toString()

12345678910>>...15