Home
last modified time | relevance | path

Searched refs:ticks (Results 1 – 21 of 21) sorted by relevance

/system/ulib/fzl/
A Dtime.cpp13 zx::ticks NsToTicks(zx::duration ns) { in NsToTicks()
14 return zx::ticks(ns_to_ticks(ns.get())); in NsToTicks()
17 zx::duration TicksToNs(zx::ticks ticks) { in TicksToNs() argument
18 return zx::duration(ticks_to_ns(ticks.get())); in TicksToNs()
28 zx_duration_t ticks_to_ns(zx_ticks_t ticks) { in ticks_to_ns() argument
29 return static_cast<zx_duration_t>(static_cast<__uint128_t>(ticks) * ZX_SEC(1) / in ticks_to_ns()
/system/ulib/zx/include/lib/zx/
A Dtime.h95 class ticks {
97 constexpr ticks() = default;
102 static ticks now() { return ticks(zx_ticks_get()); } in now()
105 static ticks per_second() { return ticks(zx_ticks_per_second()); } in per_second()
110 constexpr ticks operator+(ticks other) const {
111 return ticks(value_ + other.value_);
114 constexpr ticks operator-(ticks other) const {
119 return ticks(value_ * multiplier);
123 return ticks(value_ / divisor);
130 constexpr ticks& operator+=(ticks other) {
[all …]
/system/ulib/fs/include/fs/
A Dticker.h25 typedef zx::ticks Duration;
30 : ticks_(collecting_metrics ? zx::ticks::now() : zx::ticks()) {} in Ticker()
36 ticks_ = zx::ticks::now(); in Reset()
46 return zx::ticks(); in End()
48 return zx::ticks::now() - ticks_; in End()
51 zx::ticks ticks_;
/system/utest/libfzl/
A Dfzl-test.cpp30 bool TickConverter(zx::ticks ticks, zx::ticks err) { in TickConverter() argument
32 ASSERT_TRUE(AlmostEqual(ticks.get(), fzl::NsToTicks(fzl::TicksToNs(ticks)).get(), err.get())); in TickConverter()
33 ASSERT_TRUE(AlmostEqual(ticks.get(), ns_to_ticks(ticks_to_ns(ticks.get())), err.get())); in TickConverter()
47 zx::ticks tps = zx::ticks::per_second(); in TimeTest()
75 zx::ticks tick_loss = fbl::max(zx::ticks(1 + (tps.get() / nps.get())), in TimeTest()
76 zx::ticks(1)); in TimeTest()
80 ASSERT_TRUE(TickConverter(zx::ticks(0), zx::ticks(0))); in TimeTest()
81 ASSERT_TRUE(TickConverter(zx::ticks(50), tick_loss)); in TimeTest()
82 ASSERT_TRUE(TickConverter(zx::ticks(100), tick_loss)); in TimeTest()
83 ASSERT_TRUE(TickConverter(zx::ticks(100000), tick_loss)); in TimeTest()
[all …]
/system/utest/cobalt-client/
A Dtimer_test.cpp23 static zx::ticks now() { return GetInstance().current(); } in now()
25 zx::ticks current() const { return current_; } in current()
27 void set_current(uint32_t current) { current_ = zx::ticks(current); } in set_current()
30 zx::ticks current_ = zx::ticks(0);
38 ASSERT_EQ(timer.End().to_nsecs(), fzl::TicksToNs(zx::ticks(3)).to_nsecs()); in TestCollecting()
47 ASSERT_EQ(timer.End().to_nsecs(), fzl::TicksToNs(zx::ticks(0)).to_nsecs()); in TestNotCollecting()
58 ASSERT_EQ(timer.End().to_nsecs(), fzl::TicksToNs(zx::ticks(4)).to_nsecs()); in TestReset()
69 ASSERT_EQ(timer.End().to_nsecs(), fzl::TicksToNs(zx::ticks(0)).to_nsecs()); in TestResetNotCollecting()
A Dhistogram_test.cpp425 unsigned int seed = static_cast<unsigned int>(zx::ticks::now().get()); in TestAddMultiple()
548 unsigned int seed = static_cast<unsigned int>(zx::ticks::now().get()); in TestAddMultiThread()
610 unsigned int seed = static_cast<unsigned int>(zx::ticks::now().get()); in TestAddAndFlushMultiThread()
/system/ulib/blobfs/include/blobfs/
A Dmetrics.h78 zx::ticks total_allocation_time_ticks_ = {};
86 zx::ticks total_write_enqueue_time_ticks_ = {};
87 zx::ticks total_merkle_generation_time_ticks_ = {};
90 zx::ticks total_writeback_time_ticks_ = {};
96 zx::ticks total_read_from_disk_time_ticks_ = {};
99 zx::ticks total_read_compressed_time_ticks_ = {};
100 zx::ticks total_decompress_time_ticks_ = {};
111 zx::ticks total_verification_time_ticks_ = {};
/system/ulib/fzl/include/lib/fzl/
A Dtime.h15 zx::ticks NsToTicks(zx::duration ns);
16 zx::duration TicksToNs(zx::ticks ticks);
25 zx_duration_t ticks_to_ns(zx_ticks_t ticks);
/system/ulib/zircon/
A Dzx_ticks_get.cpp16 zx_ticks_t ticks; in _zx_ticks_get() local
17 __asm__ volatile("mrs %0, cntvct_el0" : "=r" (ticks)); in _zx_ticks_get()
18 return ticks; in _zx_ticks_get()
/system/ulib/trace/
A Devent.cpp12 : ticks(zx_ticks_get()) { in EventHelper()
17 trace_ticks_t const ticks; member
44 context, helper.ticks, &helper.thread_ref, category_ref, &helper.name_ref, in trace_internal_write_instant_event_record_and_release_context()
58 context, helper.ticks, &helper.thread_ref, category_ref, &helper.name_ref, in trace_internal_write_counter_event_record_and_release_context()
71 context, helper.ticks, &helper.thread_ref, category_ref, &helper.name_ref, in trace_internal_write_duration_begin_event_record_and_release_context()
84 context, helper.ticks, &helper.thread_ref, category_ref, &helper.name_ref, in trace_internal_write_duration_end_event_record_and_release_context()
98 context, helper.ticks, &helper.thread_ref, category_ref, &helper.name_ref, in trace_internal_write_async_begin_event_record_and_release_context()
112 context, helper.ticks, &helper.thread_ref, category_ref, &helper.name_ref, in trace_internal_write_async_instant_event_record_and_release_context()
126 context, helper.ticks, &helper.thread_ref, category_ref, &helper.name_ref, in trace_internal_write_async_end_event_record_and_release_context()
140 context, helper.ticks, &helper.thread_ref, category_ref, &helper.name_ref, in trace_internal_write_flow_begin_event_record_and_release_context()
[all …]
/system/ulib/trace-vthread/
A Devent_vthread.cpp18 : ticks(timestamp) { in VThreadEventHelper()
24 trace_ticks_t const ticks; member
48 context, helper.ticks, &helper.thread_ref, category_ref, &helper.name_ref, in trace_internal_write_vthread_duration_begin_event_record_and_release_context()
65 context, helper.ticks, &helper.thread_ref, category_ref, &helper.name_ref, in trace_internal_write_vthread_duration_end_event_record_and_release_context()
83 context, helper.ticks, &helper.thread_ref, category_ref, &helper.name_ref, in trace_internal_write_vthread_flow_begin_event_record_and_release_context()
101 context, helper.ticks, &helper.thread_ref, category_ref, &helper.name_ref, in trace_internal_write_vthread_flow_step_event_record_and_release_context()
119 context, helper.ticks, &helper.thread_ref, category_ref, &helper.name_ref, in trace_internal_write_vthread_flow_end_event_record_and_release_context()
/system/ulib/fs-test-utils/
A Dperftest.cpp82 uint64_t GetDelta(zx::ticks start) { in GetDelta()
83 return (fzl::TicksToNs(zx::ticks::now() - start).to_msecs()); in GetDelta()
92 void PrintTestSkipped(const fbl::String& name, zx::ticks start, FILE* out) { in PrintTestSkipped()
98 void PrintTestFailed(const fbl::String& name, zx::ticks start, FILE* out) { in PrintTestFailed()
104 void PrintTestPassed(const fbl::String& name, zx::ticks start, FILE* out) { in PrintTestPassed()
116 void PrintTestCaseEnd(const fbl::String& name, size_t test_count, zx::ticks start, FILE* out) { in PrintTestCaseEnd()
123 void PrintTestsCasesSummary(size_t test_case_count, const TestStats& stats, zx::ticks start, in PrintTestsCasesSummary()
127 test_case_count, fzl::TicksToNs(zx::ticks::now() - start).to_msecs()); in PrintTestsCasesSummary()
161 zx::ticks test_start = zx::ticks::now(); in RunTest()
200 zx::ticks start = zx::ticks::now(); in RunTestCase()
[all …]
/system/ulib/cobalt-client/include/cobalt-client/cpp/
A Dtimer.h19 TimerBase(TimerBase&& other) : start_(other.start_) { other.start_ = zx::ticks(0); } in TimerBase()
42 zx::ticks start_;
49 using Timer = internal::TimerBase<zx::ticks>;
/system/utest/vmo/
A Dbench.cpp24 static zx_time_t ticks_to_ns(zx_ticks_t ticks) { in ticks_to_ns() argument
25 __uint128_t temp = (__uint128_t)ticks * ZX_SEC(1) / zx_ticks_per_second(); in ticks_to_ns()
42 zx_ticks_t ticks = zx_ticks_get(); in time_it() local
44 ticks = zx_ticks_get() - ticks; in time_it()
46 return ticks_to_ns(ticks); in time_it()
/system/ulib/blobfs/
A Dmetrics.cpp17 size_t TicksToMs(const zx::ticks& ticks) { in TicksToMs() argument
18 return fzl::TicksToNs(ticks) / zx::msec(1); in TicksToMs()
/system/utest/core/time/
A Drules.mk14 $(LOCAL_DIR)/ticks.c
/system/utest/libzx/
A Dzx-test.cpp332 ASSERT_EQ(zx::ticks().get(), 0); in ticks_test()
334 zx::ticks before = zx::ticks::now(); in ticks_test()
336 zx::ticks after = before + zx::ticks(1); in ticks_test()
340 after -= zx::ticks(1); in ticks_test()
344 ASSERT_EQ(zx::ticks::per_second().get(), zx_ticks_per_second()); in ticks_test()
347 zx::ticks second = zx::ticks::per_second(); in ticks_test()
352 after = zx::ticks::now(); in ticks_test()
/system/uapp/iochk/
A Diochk.cpp77 int ticks = 40; in Update() local
78 char str[ticks + 1]; in Update()
79 memset(str, ' ', ticks); in Update()
80 memset(str, '=', ticks * progress / 100); in Update()
81 str[ticks] = '\0'; in Update()
/system/ulib/fs-test-utils/include/fs-test-utils/
A Dfixture.h58 options.seed = static_cast<unsigned int>(zx::ticks::now().get()); in Default()
/system/ulib/ftl/inc/
A Dsys.h245 int measReportTicks(const char* fmt, time_t ticks);
/system/public/zircon/
A Dsyscalls.abigen73 #^ Read the number of high-precision timer ticks since boot.
78 #^ Read the number of high-precision timer ticks in a second.

Completed in 42 milliseconds