/system/libfmq/benchmarks/ |
D | msgq_benchmark_client.cpp | 127 std::chrono::time_point<std::chrono::high_resolution_clock> timeStart = in TEST_F() 128 std::chrono::high_resolution_clock::now(); in TEST_F() 138 std::chrono::time_point<std::chrono::high_resolution_clock> timeEnd = in TEST_F() 139 std::chrono::high_resolution_clock::now(); in TEST_F() 140 accumulatedTime += static_cast<int64_t>(std::chrono::duration_cast<std::chrono::nanoseconds>( in TEST_F() 161 std::chrono::time_point<std::chrono::high_resolution_clock> timeStart = in TEST_F() 162 std::chrono::high_resolution_clock::now(); in TEST_F() 171 std::chrono::time_point<std::chrono::high_resolution_clock> timeEnd = in TEST_F() 172 std::chrono::high_resolution_clock::now(); in TEST_F() 195 std::chrono::time_point<std::chrono::high_resolution_clock> timeStart = in TEST_F() [all …]
|
/system/bt/common/test/ |
D | thread_performance_test.cc | 122 std::chrono::steady_clock::time_point start_time = in TEST_F() 123 std::chrono::steady_clock::now(); in TEST_F() 132 std::chrono::steady_clock::time_point end_time = in TEST_F() 133 std::chrono::steady_clock::now(); in TEST_F() 134 std::chrono::milliseconds duration = in TEST_F() 135 std::chrono::duration_cast<std::chrono::milliseconds>(end_time - in TEST_F() 167 std::chrono::steady_clock::time_point start_time = in TEST_F() 168 std::chrono::steady_clock::now(); in TEST_F() 177 std::chrono::steady_clock::time_point end_time = in TEST_F() 178 std::chrono::steady_clock::now(); in TEST_F() [all …]
|
/system/core/fs_mgr/ |
D | file_wait.cpp | 41 bool PollForFile(const std::string& path, const std::chrono::milliseconds relative_timeout) { in PollForFile() 42 auto start_time = std::chrono::steady_clock::now(); in PollForFile() 49 auto now = std::chrono::steady_clock::now(); in PollForFile() 50 auto time_elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now - start_time); in PollForFile() 55 bool PollForFileDeleted(const std::string& path, const std::chrono::milliseconds relative_timeout) { in PollForFileDeleted() 56 auto start_time = std::chrono::steady_clock::now(); in PollForFileDeleted() 63 auto now = std::chrono::steady_clock::now(); in PollForFileDeleted() 64 auto time_elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now - start_time); in PollForFileDeleted() 73 const std::chrono::milliseconds relative_timeout); 88 std::chrono::time_point<std::chrono::steady_clock> start_time_; [all …]
|
/system/core/llkd/include/ |
D | llkd.h | 77 std::chrono::milliseconds llkCheck(bool checkRunning = false); 80 #define LLK_TIMEOUT_MS_DEFAULT std::chrono::duration_cast<milliseconds>(std::chrono::minutes(10)) 81 #define LLK_TIMEOUT_MS_MINIMUM std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::… 82 #define LLK_CHECK_MS_MINIMUM std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::…
|
/system/bt/gd/os/linux_generic/ |
D | alarm_unittest.cc | 58 auto before = std::chrono::steady_clock::now(); in TEST_F() 62 …BindOnce(&std::promise<void>::set_value, common::Unretained(&promise)), std::chrono::milliseconds(… in TEST_F() 64 auto after = std::chrono::steady_clock::now(); in TEST_F() 65 auto duration_ms = std::chrono::duration_cast<std::chrono::milliseconds>(after - before); in TEST_F() 70 …alarm_->Schedule(BindOnce([]() { ASSERT_TRUE(false) << "Should not happen"; }), std::chrono::milli… in TEST_F() 72 std::this_thread::sleep_for(std::chrono::milliseconds(5)); in TEST_F() 76 …alarm_->Schedule(BindOnce(&Alarm::Cancel, common::Unretained(alarm_)), std::chrono::milliseconds(1… in TEST_F() 77 std::this_thread::sleep_for(std::chrono::milliseconds(5)); in TEST_F() 81 …alarm_->Schedule(BindOnce([]() { ASSERT_TRUE(false) << "Should not happen"; }), std::chrono::milli… in TEST_F() 85 …BindOnce(&std::promise<void>::set_value, common::Unretained(&promise)), std::chrono::milliseconds(… in TEST_F() [all …]
|
D | repeating_alarm_unittest.cc | 48 auto start_time = std::chrono::steady_clock::now(); in VerifyMultipleDelayedTasks() 60 std::chrono::milliseconds(interval_between_tasks_ms)); in VerifyMultipleDelayedTasks() 67 std::chrono::steady_clock::time_point start_time, in verify_delayed_tasks() 73 auto time_now = std::chrono::steady_clock::now(); in verify_delayed_tasks() 79 std::this_thread::sleep_for(std::chrono::milliseconds(task_length_ms)); in verify_delayed_tasks() 98 auto before = std::chrono::steady_clock::now(); in TEST_F() 101 …common::Bind(&std::promise<void>::set_value, common::Unretained(&promise)), std::chrono::milliseco… in TEST_F() 104 auto after = std::chrono::steady_clock::now(); in TEST_F() 110 alarm_->Schedule(should_not_happen_, std::chrono::milliseconds(10)); in TEST_F() 112 std::this_thread::sleep_for(std::chrono::milliseconds(50)); in TEST_F() [all …]
|
/system/netd/server/ |
D | Process.cpp | 57 const std::chrono::steady_clock::time_point sStartTime = std::chrono::steady_clock::now(); 59 std::chrono::milliseconds totalRunningTime() { in totalRunningTime() 60 return std::chrono::duration_cast<std::chrono::milliseconds>( in totalRunningTime() 61 std::chrono::steady_clock::now() - sStartTime); in totalRunningTime() 64 std::string formatDuration(std::chrono::milliseconds duration) { in formatDuration() 65 auto hrs = std::chrono::duration_cast<std::chrono::hours>(duration); in formatDuration() 67 const auto mins = std::chrono::duration_cast<std::chrono::minutes>(duration); in formatDuration() 69 const auto secs = std::chrono::duration_cast<std::chrono::seconds>(duration); in formatDuration() 74 hrs -= std::chrono::hours(days * 24); in formatDuration()
|
/system/libbase/ |
D | chrono_utils_test.cpp | 31 std::chrono::seconds GetBootTimeSeconds() { 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() 37 return std::chrono::duration_cast<std::chrono::seconds>(now_tp.time_since_epoch()); in GetBootTimeSeconds() 44 std::chrono::duration_cast<std::chrono::seconds>(boot_clock::now().time_since_epoch()); in TEST() 63 auto expected = std::chrono::duration_cast<std::chrono::milliseconds>(stop - start); in TEST()
|
D | properties.cpp | 155 static void DurationToTimeSpec(timespec& ts, const std::chrono::milliseconds d) { in DurationToTimeSpec() 156 auto s = std::chrono::duration_cast<std::chrono::seconds>(d); in DurationToTimeSpec() 157 auto ns = std::chrono::duration_cast<std::chrono::nanoseconds>(d - s); in DurationToTimeSpec() 158 ts.tv_sec = std::min<std::chrono::seconds::rep>(s.count(), std::numeric_limits<time_t>::max()); in DurationToTimeSpec() 162 using AbsTime = std::chrono::time_point<std::chrono::steady_clock>; 164 static void UpdateTimeSpec(timespec& ts, std::chrono::milliseconds relative_timeout, in UpdateTimeSpec() 166 auto now = std::chrono::steady_clock::now(); in UpdateTimeSpec() 167 auto time_elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now - start_time); in UpdateTimeSpec() 181 const std::chrono::milliseconds& relative_timeout, in WaitForPropertyCreation() 197 std::chrono::milliseconds relative_timeout) { in WaitForProperty() [all …]
|
/system/extras/simpleperf/ |
D | cpu_hotplug_test.cpp | 42 static auto test_duration_for_long_tests = std::chrono::seconds(120); 43 static auto cpu_hotplug_interval = std::chrono::microseconds(1000); 74 std::this_thread::sleep_for(std::chrono::milliseconds(500)); in DisableMpdecision() 80 std::this_thread::sleep_for(std::chrono::milliseconds(500)); in EnableMpdecision() 146 std::this_thread::sleep_for(std::chrono::milliseconds(1)); in SetCpuOnline() 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() 246 auto report_step = std::chrono::seconds(15); in TEST() 250 if (cur_time + report_step < std::chrono::steady_clock::now()) { in TEST() 252 auto diff = std::chrono::duration_cast<std::chrono::seconds>( in TEST() [all …]
|
/system/bt/gd/os/ |
D | alarm_benchmark.cc | 60 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()
|
/system/bt/common/ |
D | stop_watch_legacy.cc | 42 std::chrono::duration_cast<std::chrono::microseconds>( in RecordLog() 70 auto millis = std::chrono::duration_cast<std::chrono::milliseconds>( in DumpStopWatchLog() 73 auto now_time_t = std::chrono::system_clock::to_time_t(now); in DumpStopWatchLog() 80 std::chrono::duration_cast<std::chrono::microseconds>( 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()
|
D | stop_watch_legacy.h | 26 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_;
|
D | repeating_timer_unittest.cc | 55 std::this_thread::sleep_for(std::chrono::milliseconds(sleep_ms)); in SleepAndIncreaseCounter() 59 void VerifyDelayTimeAndSleep(std::chrono::steady_clock::time_point start_time, in VerifyDelayTimeAndSleep() 63 auto end_time = std::chrono::steady_clock::now(); in VerifyDelayTimeAndSleep() 64 auto actual_delay = std::chrono::duration_cast<std::chrono::milliseconds>( in VerifyDelayTimeAndSleep() 72 std::this_thread::sleep_for(std::chrono::milliseconds(task_length_ms)); in VerifyDelayTimeAndSleep() 82 auto start_time = std::chrono::steady_clock::now(); in VerifyMultipleDelayedTasks() 163 std::this_thread::sleep_for(std::chrono::milliseconds(delay_error_ms)); in TEST_F() 179 std::this_thread::sleep_for(std::chrono::milliseconds(delay_error_ms)); in TEST_F() 190 std::this_thread::sleep_for(std::chrono::milliseconds(delay_ms)); in TEST_F() 210 std::chrono::milliseconds(delay_ms + delay_error_ms)); in TEST_F() [all …]
|
/system/bt/gd/common/ |
D | stop_watch.cc | 42 std::chrono::duration_cast<std::chrono::microseconds>( in RecordLog() 70 auto millis = std::chrono::duration_cast<std::chrono::milliseconds>( in DumpStopWatchLog() 73 auto now_time_t = std::chrono::system_clock::to_time_t(now); in DumpStopWatchLog() 81 static_cast<size_t>(std::chrono::duration_cast<std::chrono::microseconds>( 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()
|
D | stop_watch.h | 26 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_;
|
/system/core/fs_mgr/libdm/ |
D | utility.cpp | 30 const std::chrono::milliseconds& timeout_ms) { in WaitForCondition() 31 auto start_time = std::chrono::steady_clock::now(); in WaitForCondition() 39 auto now = std::chrono::steady_clock::now(); in WaitForCondition() 40 auto time_elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now - start_time); in WaitForCondition() 45 bool WaitForFile(const std::string& path, const std::chrono::milliseconds& timeout_ms) { in WaitForFile() 61 bool WaitForFileDeleted(const std::string& path, const std::chrono::milliseconds& timeout_ms) { in WaitForFileDeleted()
|
D | loop_control.cpp | 42 bool LoopControl::Attach(int file_fd, const std::chrono::milliseconds& timeout_ms, in Attach() 44 auto start_time = std::chrono::steady_clock::now(); in Attach() 51 auto now = std::chrono::steady_clock::now(); in Attach() 52 auto time_elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now - start_time); in Attach() 136 LoopDevice::LoopDevice(android::base::borrowed_fd fd, const std::chrono::milliseconds& timeout_ms, in LoopDevice() 145 LoopDevice::LoopDevice(const std::string& path, const std::chrono::milliseconds& timeout_ms) in LoopDevice() 162 void LoopDevice::Init(const std::chrono::milliseconds& timeout_ms) { in Init()
|
/system/netd/libnetdutils/ |
D | BackoffSequenceTest.cpp | 133 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 …]
|
/system/bt/gd/btaa/linux_generic/ |
D | wakelock_processor.cc | 32 auto cur_time = std::chrono::system_clock::now(); in OnWakelockReleased() 41 …std::chrono::duration_cast<std::chrono::milliseconds>(cur_time - wakelock_acquired_time_).count()); in OnWakelockReleased() 50 auto cur_time = std::chrono::system_clock::now(); in OnWakelockAcquired() 57 …} else if (cur_time - wakelock_acquired_time_ > std::chrono::milliseconds(kWakelockMaxDurationMs))… in OnWakelockAcquired()
|
/system/libbase/include/android-base/ |
D | chrono_utils.h | 32 typedef std::chrono::nanoseconds duration; 33 typedef std::chrono::time_point<boot_clock, duration> time_point; 42 std::chrono::milliseconds duration() const { in duration() 43 return std::chrono::duration_cast<std::chrono::milliseconds>(boot_clock::now() - start_); in duration()
|
/system/extras/zram-perf/ |
D | zram-perf.cpp | 84 chrono::time_point<chrono::high_resolution_clock> start, end; in benchSequentialRead() 89 start = chrono::high_resolution_clock::now(); in benchSequentialRead() 100 end = chrono::high_resolution_clock::now(); in benchSequentialRead() 101 size_t duration = chrono::duration_cast<chrono::microseconds>(end - start).count(); in benchSequentialRead() 105 chrono::time_point<chrono::high_resolution_clock> start, end; in benchSequentialWrite() 110 start = chrono::high_resolution_clock::now(); in benchSequentialWrite() 122 end = chrono::high_resolution_clock::now(); in benchSequentialWrite() 123 size_t duration = chrono::duration_cast<chrono::microseconds>(end - start).count(); in benchSequentialWrite()
|
/system/bt/gd/l2cap/internal/ |
D | parameter_provider.h | 33 virtual std::chrono::milliseconds GetClassicLinkIdleDisconnectTimeout() { in GetClassicLinkIdleDisconnectTimeout() 34 return std::chrono::seconds(20); in GetClassicLinkIdleDisconnectTimeout() 36 virtual std::chrono::milliseconds GetLeLinkIdleDisconnectTimeout() { in GetLeLinkIdleDisconnectTimeout() 37 return std::chrono::seconds(1); in GetLeLinkIdleDisconnectTimeout()
|
/system/bt/vendor_libs/test_vendor_lib/model/controller/ |
D | le_advertiser.h | 41 std::chrono::steady_clock::duration interval); 47 std::chrono::steady_clock::duration interval); 54 std::chrono::steady_clock::time_point); 66 void EnableExtended(std::chrono::steady_clock::duration duration); 80 std::chrono::steady_clock::duration interval_{}; 81 std::chrono::steady_clock::time_point ending_time_{}; 83 std::chrono::steady_clock::time_point last_le_advertisement_;
|
/system/bt/vendor_libs/test_vendor_lib/model/setup/ |
D | test_model.h | 37 std::function<AsyncTaskId(AsyncUserId, std::chrono::milliseconds, 40 std::function<AsyncTaskId(AsyncUserId, std::chrono::milliseconds, 41 std::chrono::milliseconds, const TaskCallback&)> 89 void SetTimerPeriod(std::chrono::milliseconds new_period); 104 std::function<AsyncTaskId(AsyncUserId, std::chrono::milliseconds, 107 std::function<AsyncTaskId(AsyncUserId, std::chrono::milliseconds, 108 std::chrono::milliseconds, const TaskCallback&)> 116 std::chrono::milliseconds timer_period_{};
|