/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/ |
D | ShadowSystemClockTest.java | 10 import android.os.SystemClock; 23 assertThat(SystemClock.uptimeMillis()).isNotEqualTo(1000); in shouldAllowForFakingOfTime() 25 assertThat(SystemClock.uptimeMillis()).isEqualTo(1000); in shouldAllowForFakingOfTime() 31 SystemClock.sleep(34); in sleep() 32 assertThat(SystemClock.uptimeMillis()).isEqualTo(1034); in sleep() 39 assertTrue(SystemClock.setCurrentTimeMillis(1034)); in testSetCurrentTime() 41 assertFalse(SystemClock.setCurrentTimeMillis(1000)); in testSetCurrentTime() 48 assertThat(SystemClock.elapsedRealtime()).isEqualTo(1000); in testElapsedRealtime() 50 assertThat(SystemClock.elapsedRealtime()).isEqualTo(1034); in testElapsedRealtime() 56 assertThat(SystemClock.elapsedRealtimeNanos()).isEqualTo(1000000000); in testElapsedRealtimeNanos() [all …]
|
/external/pigweed/pw_thread/ |
D | sleep_facade_test.cc | 22 using pw::chrono::SystemClock; 40 constexpr SystemClock::duration kRoundedArbitraryDuration = 41 SystemClock::for_at_least(42ms); 49 const SystemClock::time_point before = SystemClock::now(); in TEST() 51 const SystemClock::duration time_elapsed = SystemClock::now() - before; in TEST() 59 const SystemClock::time_point deadline = in TEST() 60 SystemClock::now() + kRoundedArbitraryDuration; in TEST() 62 EXPECT_GE(SystemClock::now(), deadline); in TEST()
|
D | sleep.cc | 17 using pw::chrono::SystemClock; 21 pw::this_thread::sleep_for(SystemClock::duration(for_at_least.ticks)); in pw_this_thread_SleepFor() 26 pw::this_thread::sleep_until(SystemClock::time_point( in pw_this_thread_SleepUntil() 27 SystemClock::duration(until_at_least.duration_since_epoch.ticks))); in pw_this_thread_SleepUntil()
|
/external/pigweed/pw_chrono/ |
D | system_clock_facade_test.cc | 49 TEST(SystemClock, Now) { in TEST() argument 50 const SystemClock::time_point start_time = SystemClock::now(); in TEST() 54 if (SystemClock::now() > start_time) { in TEST() 64 const SystemClock::time_point start_time = clock.now(); in TEST() 76 TEST(SystemClock, NowInC) { in TEST() argument 91 TEST(SystemClock, TimeElapsedInC) { in TEST() argument 94 static_assert(SystemClock::is_monotonic); in TEST() 98 TEST(SystemClock, DurationCastInC) { in TEST() argument 103 std::chrono::floor<SystemClock::duration>(42h); in TEST()
|
D | simulated_system_clock_test.cc | 27 constexpr SystemClock::duration kRoundedArbitraryDuration = 28 SystemClock::for_at_least(42h); 33 EXPECT_EQ(SystemClock::time_point(SystemClock::duration(0)), clock.now()); in TEST() 39 clock.SetTime(pw::chrono::SystemClock::time_point(kRoundedArbitraryDuration)); in TEST() 46 const SystemClock::time_point before_timestamp = clock.now(); in TEST() 48 const SystemClock::time_point after_timestamp = clock.now(); in TEST()
|
/external/pigweed/pw_sync/ |
D | binary_semaphore_facade_test.cc | 21 using pw::chrono::SystemClock; 47 constexpr SystemClock::duration kRoundedArbitraryDuration = 48 SystemClock::for_at_least(42ms); 86 SystemClock::time_point before = SystemClock::now(); in TEST() 88 SystemClock::duration time_elapsed = SystemClock::now() - before; in TEST() 92 before = SystemClock::now(); in TEST() 94 time_elapsed = SystemClock::now() - before; in TEST() 102 const SystemClock::time_point deadline = in TEST() 103 SystemClock::now() + kRoundedArbitraryDuration; in TEST() 105 EXPECT_LT(SystemClock::now(), deadline); in TEST() [all …]
|
D | counting_semaphore_facade_test.cc | 21 using pw::chrono::SystemClock; 52 constexpr SystemClock::duration kRoundedArbitraryDuration = 53 SystemClock::for_at_least(42ms); 104 SystemClock::time_point before = SystemClock::now(); in TEST() 106 SystemClock::duration time_elapsed = SystemClock::now() - before; in TEST() 110 before = SystemClock::now(); in TEST() 112 time_elapsed = SystemClock::now() - before; in TEST() 120 const SystemClock::time_point deadline = in TEST() 121 SystemClock::now() + kRoundedArbitraryDuration; in TEST() 123 EXPECT_LT(SystemClock::now(), deadline); in TEST() [all …]
|
D | timed_mutex_facade_test.cc | 21 using pw::chrono::SystemClock; 43 constexpr SystemClock::duration kRoundedArbitraryDuration = 44 SystemClock::for_at_least(42ms); 80 SystemClock::time_point before = SystemClock::now(); in TEST() 84 SystemClock::duration time_elapsed = SystemClock::now() - before; in TEST() 100 const SystemClock::time_point deadline = in TEST() 101 SystemClock::now() + kRoundedArbitraryDuration; in TEST() 105 EXPECT_LT(SystemClock::now(), deadline); in TEST()
|
D | timed_mutex.cc | 17 using pw::chrono::SystemClock; 29 return mutex->try_lock_for(SystemClock::duration(for_at_least.ticks)); in pw_sync_TimedMutex_TryLockFor() 34 return mutex->try_lock_until(SystemClock::time_point( in pw_sync_TimedMutex_TryLockUntil() 35 SystemClock::duration(until_at_least.duration_since_epoch.ticks))); in pw_sync_TimedMutex_TryLockUntil()
|
/external/pigweed/pw_chrono/public/pw_chrono/ |
D | simulated_system_clock.h | 43 SimulatedSystemClock(SystemClock::time_point timestamp = 44 SystemClock::time_point(SystemClock::duration(0))) 47 void AdvanceTime(SystemClock::duration duration) { in AdvanceTime() 53 void SetTime(SystemClock::time_point timestamp) { in SetTime() 58 SystemClock::time_point now() override { in now() 67 SystemClock::time_point current_timestamp_;
|
/external/pigweed/pw_i2c/public/pw_i2c/ |
D | initiator.h | 75 chrono::SystemClock::duration for_at_least) { in WriteReadFor() 83 chrono::SystemClock::duration for_at_least) { in WriteReadFor() 112 chrono::SystemClock::duration for_at_least) { in WriteFor() 118 chrono::SystemClock::duration for_at_least) { in WriteFor() 146 chrono::SystemClock::duration for_at_least) { in ReadFor() 153 chrono::SystemClock::duration for_at_least) { in ReadFor() 179 chrono::SystemClock::duration for_at_least) { in ProbeDeviceFor() 189 chrono::SystemClock::duration for_at_least) = 0;
|
/external/pigweed/pw_thread_freertos/ |
D | sleep.cc | 26 using pw::chrono::SystemClock; 30 void sleep_for(SystemClock::duration for_at_least) { in sleep_for() 34 if (for_at_least <= SystemClock::duration::zero()) { in sleep_for() 41 constexpr SystemClock::duration kMaxTimeoutMinusOne = in sleep_for() 42 pw::chrono::freertos::kMaxTimeout - SystemClock::duration(1); in sleep_for()
|
/external/pigweed/pw_thread_embos/ |
D | sleep.cc | 25 using pw::chrono::SystemClock; 29 void sleep_for(chrono::SystemClock::duration for_at_least) { in sleep_for() 33 if (for_at_least <= SystemClock::duration::zero()) { in sleep_for() 40 constexpr SystemClock::duration kMaxTimeoutMinusOne = in sleep_for() 41 pw::chrono::embos::kMaxTimeout - SystemClock::duration(1); in sleep_for()
|
/external/pigweed/pw_sync_embos/ |
D | binary_semaphore.cc | 25 using pw::chrono::SystemClock; 29 bool BinarySemaphore::try_acquire_for(SystemClock::duration for_at_least) { in try_acquire_for() 33 if (for_at_least <= SystemClock::duration::zero()) { in try_acquire_for() 39 constexpr SystemClock::duration kMaxTimeoutMinusOne = in try_acquire_for() 40 pw::chrono::embos::kMaxTimeout - SystemClock::duration(1); in try_acquire_for()
|
D | timed_mutex.cc | 25 using pw::chrono::SystemClock; 29 bool TimedMutex::try_lock_for(SystemClock::duration for_at_least) { in try_lock_for() 33 if (for_at_least <= SystemClock::duration::zero()) { in try_lock_for() 39 constexpr SystemClock::duration kMaxTimeoutMinusOne = in try_lock_for() 40 pw::chrono::embos::kMaxTimeout - SystemClock::duration(1); in try_lock_for()
|
D | counting_semaphore.cc | 25 using pw::chrono::SystemClock; 43 bool CountingSemaphore::try_acquire_for(SystemClock::duration for_at_least) { in try_acquire_for() 47 if (for_at_least <= SystemClock::duration::zero()) { in try_acquire_for() 53 constexpr SystemClock::duration kMaxTimeoutMinusOne = in try_acquire_for() 54 pw::chrono::embos::kMaxTimeout - SystemClock::duration(1); in try_acquire_for()
|
/external/pigweed/pw_sync_freertos/ |
D | timed_mutex.cc | 26 using pw::chrono::SystemClock; 30 bool TimedMutex::try_lock_for(SystemClock::duration for_at_least) { in try_lock_for() 34 if (for_at_least <= SystemClock::duration::zero()) { in try_lock_for() 40 constexpr SystemClock::duration kMaxTimeoutMinusOne = in try_lock_for() 41 pw::chrono::freertos::kMaxTimeout - SystemClock::duration(1); in try_lock_for()
|
D | binary_semaphore.cc | 26 using pw::chrono::SystemClock; 36 bool BinarySemaphore::try_acquire_for(SystemClock::duration for_at_least) { in try_acquire_for() 40 if (for_at_least <= SystemClock::duration::zero()) { in try_acquire_for() 46 constexpr SystemClock::duration kMaxTimeoutMinusOne = in try_acquire_for() 47 pw::chrono::freertos::kMaxTimeout - SystemClock::duration(1); in try_acquire_for()
|
D | counting_semaphore.cc | 26 using pw::chrono::SystemClock; 56 bool CountingSemaphore::try_acquire_for(SystemClock::duration for_at_least) { in try_acquire_for() 60 if (for_at_least <= SystemClock::duration::zero()) { in try_acquire_for() 66 constexpr SystemClock::duration kMaxTimeoutMinusOne = in try_acquire_for() 67 pw::chrono::freertos::kMaxTimeout - SystemClock::duration(1); in try_acquire_for()
|
/external/pigweed/pw_thread_stl/public/pw_thread_stl/ |
D | sleep_inline.h | 23 inline void sleep_for(chrono::SystemClock::duration for_at_least) { in sleep_for() 24 for_at_least = std::max(for_at_least, chrono::SystemClock::duration::zero()); in sleep_for() 27 if (for_at_least == chrono::SystemClock::duration::zero()) { in sleep_for() 33 inline void sleep_until(chrono::SystemClock::time_point until_at_least) { in sleep_until() 36 if (chrono::SystemClock::now() >= until_at_least) { in sleep_until()
|
/external/tensorflow/tensorflow/tools/android/test/src/org/tensorflow/demo/env/ |
D | SplitTimer.java | 18 import android.os.SystemClock; 35 lastWallTime = SystemClock.uptimeMillis(); in newSplit() 36 lastCpuTime = SystemClock.currentThreadTimeMillis(); in newSplit() 40 final long currWallTime = SystemClock.uptimeMillis(); in endSplit() 41 final long currCpuTime = SystemClock.currentThreadTimeMillis(); in endSplit()
|
/external/pigweed/pw_thread_threadx/ |
D | sleep.cc | 25 using pw::chrono::SystemClock; 29 void sleep_for(chrono::SystemClock::duration for_at_least) { in sleep_for() 33 if (for_at_least <= chrono::SystemClock::duration::zero()) { in sleep_for() 40 constexpr SystemClock::duration kMaxTimeoutMinusOne = in sleep_for() 41 pw::chrono::threadx::kMaxTimeout - SystemClock::duration(1); in sleep_for()
|
/external/pigweed/pw_sync_threadx/ |
D | counting_semaphore.cc | 25 using pw::chrono::SystemClock; 29 bool CountingSemaphore::try_acquire_for(SystemClock::duration for_at_least) { in try_acquire_for() 34 if (for_at_least <= SystemClock::duration::zero()) { in try_acquire_for() 40 constexpr SystemClock::duration kMaxTimeoutMinusOne = in try_acquire_for() 41 pw::chrono::threadx::kMaxTimeout - SystemClock::duration(1); in try_acquire_for()
|
D | timed_mutex.cc | 25 using pw::chrono::SystemClock; 29 bool TimedMutex::try_lock_for(SystemClock::duration for_at_least) { in try_lock_for() 34 if (for_at_least <= SystemClock::duration::zero()) { in try_lock_for() 40 constexpr SystemClock::duration kMaxTimeoutMinusOne = in try_lock_for() 41 pw::chrono::threadx::kMaxTimeout - SystemClock::duration(1); in try_lock_for()
|
D | binary_semaphore.cc | 25 using pw::chrono::SystemClock; 29 bool BinarySemaphore::try_acquire_for(SystemClock::duration for_at_least) { in try_acquire_for() 34 if (for_at_least <= SystemClock::duration::zero()) { in try_acquire_for() 40 constexpr SystemClock::duration kMaxTimeoutMinusOne = in try_acquire_for() 41 pw::chrono::threadx::kMaxTimeout - SystemClock::duration(1); in try_acquire_for()
|