Home
last modified time | relevance | path

Searched refs:FakeClock (Results 1 – 25 of 98) sorted by relevance

1234

/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DFakeClockTest.java39 FakeClock fakeClock = new FakeClock(); in testScheduledExecutorService_sameInstance()
47 FakeClock fakeClock = new FakeClock(); in testScheduledExecutorService_isDone()
60 FakeClock fakeClock = new FakeClock(); in testScheduledExecutorService_cancel()
73 FakeClock fakeClock = new FakeClock(); in testScheduledExecutorService_getDelay()
83 FakeClock fakeClock = new FakeClock(); in testScheduledExecutorService_result()
101 FakeClock fakeClock = new FakeClock(); in testStopWatch()
129 FakeClock fakeClock = new FakeClock(); in testPendingAndDueTasks()
163 FakeClock fakeClock = new FakeClock(); in testTaskFilter()
179 FakeClock.TaskFilter filter = new FakeClock.TaskFilter() { in testTaskFilter()
/external/openscreen/util/
Dalarm_unittest.cc20 FakeClock* clock() { return &clock_; } in clock()
25 FakeClock clock_{Clock::now()};
27 Alarm alarm_{&FakeClock::now, &task_runner_};
33 const Clock::time_point alarm_time = FakeClock::now() + kDelay; in TEST_F()
35 alarm()->Schedule([&]() { actual_run_time = FakeClock::now(); }, alarm_time); in TEST_F()
53 const Clock::time_point expected_run_time = FakeClock::now(); in TEST_F()
55 alarm()->Schedule([&]() { actual_run_time = FakeClock::now(); }, in TEST_F()
76 Alarm scoped_alarm(&FakeClock::now, task_runner()); in TEST_F()
77 const Clock::time_point alarm_time = FakeClock::now() + kDelay; in TEST_F()
78 scoped_alarm.Schedule([&]() { actual_run_time = FakeClock::now(); }, in TEST_F()
[all …]
/external/webrtc/rtc_base/
Dfake_clock.h28 class FakeClock : public ClockInterface {
30 FakeClock() = default;
31 FakeClock(const FakeClock&) = delete;
32 FakeClock& operator=(const FakeClock&) = delete;
33 ~FakeClock() override = default;
57 FakeClock clock_;
62 class ScopedBaseFakeClock : public FakeClock {
Dtime_utils_unittest.cc217 TEST(FakeClock, TimeFunctionsUseFakeClock) { in TEST() argument
218 FakeClock clock; in TEST()
233 TEST(FakeClock, InitialTime) { in TEST() argument
234 FakeClock clock; in TEST()
238 TEST(FakeClock, SetTime) { in TEST() argument
239 FakeClock clock; in TEST()
246 TEST(FakeClock, AdvanceTime) { in TEST() argument
247 FakeClock clock; in TEST()
262 TEST(FakeClock, SettingTimeWakesThreads) { in TEST() argument
Dfake_clock.cc18 int64_t FakeClock::TimeNanos() const { in TimeNanos()
23 void FakeClock::SetTime(webrtc::Timestamp new_time) { in SetTime()
29 void FakeClock::AdvanceTime(webrtc::TimeDelta delta) { in AdvanceTime()
/external/openscreen/platform/test/
Dfake_clock.cc18 FakeClock::FakeClock(Clock::time_point start_time) in FakeClock() function in openscreen::FakeClock
25 FakeClock::~FakeClock() { in ~FakeClock()
32 Clock::time_point FakeClock::now() noexcept { in now()
38 void FakeClock::Advance(Clock::duration delta) { in Advance()
67 void FakeClock::SubscribeToTimeChanges(FakeTaskRunner* task_runner) { in SubscribeToTimeChanges()
74 void FakeClock::UnsubscribeFromTimeChanges(FakeTaskRunner* task_runner) { in UnsubscribeFromTimeChanges()
82 std::atomic<Clock::time_point> FakeClock::now_{kInvalid};
Dfake_task_runner.cc13 FakeTaskRunner::FakeTaskRunner(FakeClock* clock) : clock_(clock) { in FakeTaskRunner()
29 const auto current_time = FakeClock::now(); in RunTasksUntilIdle()
59 std::make_pair(FakeClock::now() + delay, std::move(task))); in PostPackagedTaskWithDelay()
68 return FakeClock::now(); in GetResumeTime()
Dfake_clock.h18 class FakeClock {
20 explicit FakeClock(Clock::time_point start_time);
21 ~FakeClock();
Dfake_task_runner.h47 explicit FakeTaskRunner(FakeClock* clock);
66 FakeClock* const clock_;
/external/exoplayer/tree/testutils/src/test/java/com/google/android/exoplayer2/testutil/
DFakeClockTest.java40 FakeClock fakeClock = new FakeClock(/* initialTimeMs= */ 10); in currentTimeMillis_withoutBootTime()
46 FakeClock fakeClock = new FakeClock(/* bootTimeMs= */ 150, /* initialTimeMs= */ 200); in currentTimeMillis_withBootTime()
52 FakeClock fakeClock = new FakeClock(/* bootTimeMs= */ 100, /* initialTimeMs= */ 50); in currentTimeMillis_advanceTime_currentTimeHasAdvanced()
59 FakeClock fakeClock = new FakeClock(2000); in testAdvanceTime()
69 FakeClock fakeClock = new FakeClock(0); in testSleep()
113 FakeClock fakeClock = new FakeClock(0); in testPostDelayed()
/external/crosvm/sys_util/src/
Dclock.rs47 pub struct FakeClock { struct
52 impl FakeClock { implementation
54 FakeClock { in new()
62 FakeClock { in now()
85 Some(FakeClock { in checked_sub()
114 impl Default for FakeClock { implementation
Dtimerfd.rs18 use crate::{errno_result, EventFd, FakeClock, Result};
157 clock: Arc<Mutex<FakeClock>>,
166 pub fn new(clock: Arc<Mutex<FakeClock>>) -> Self { in new()
285 let clock = Arc::new(Mutex::new(FakeClock::new())); in fake_one_shot()
302 let clock = Arc::new(Mutex::new(FakeClock::new())); in fake_repeating()
/external/openscreen/cast/streaming/
Dsender_unittest.cc138 remote_->OnReceivedPacket(local_endpoint_, FakeClock::now(), in StartPacketTransmission()
162 rtcp_session_(kSenderSsrc, kReceiverSsrc, FakeClock::now()), in MockReceiver()
222 rtcp_builder_.BuildPacket(FakeClock::now(), buffer); in TransmitRtcpFeedbackPacket()
336 sender_environment_(&FakeClock::now, &task_runner_), in SenderTest()
437 FakeClock fake_clock_;
491 FakeClock::now() - kCaptureDelay, 0xbf - i, in TEST_F()
513 PopulateFrameWithDefaults(FrameId::first(), FakeClock::now(), 0, in TEST_F()
552 PopulateFrameWithDefaults(FrameId::first(), FakeClock::now(), 0, in TEST_F()
629 PopulateFrameWithDefaults(sender()->GetNextFrameId(), FakeClock::now(), 0, in TEST_F()
638 PopulateFrameWithDefaults(sender()->GetNextFrameId(), FakeClock::now(), 0, in TEST_F()
[all …]
Dreceiver_unittest.cc147 rtcp_session_(kSenderSsrc, kReceiverSsrc, FakeClock::now()),
268 env_(&FakeClock::now, &task_runner_), in ReceiverTest()
307 const Clock::time_point start_time = FakeClock::now(); in ExchangeInitialReportPackets()
355 FakeClock clock_;
381 const Clock::time_point sender_reference_time = FakeClock::now(); in TEST_F()
428 const Clock::time_point start_time = FakeClock::now(); in TEST_F()
474 const Clock::time_point start_time = FakeClock::now(); in TEST_F()
592 const Clock::time_point start_time = FakeClock::now(); in TEST_F()
683 const Clock::time_point start_time = FakeClock::now(); in TEST_F()
746 const Clock::time_point start_time = FakeClock::now(); in TEST_F()
/external/grpc-grpc-java/netty/src/test/java/io/grpc/netty/
DNettyTransportTest.java21 import io.grpc.internal.FakeClock;
35 private final FakeClock fakeClock = new FakeClock();
DMaxConnectionIdleManagerTest.java25 import io.grpc.internal.FakeClock;
38 private final FakeClock fakeClock = new FakeClock();
/external/grpc-grpc-java/okhttp/src/test/java/io/grpc/okhttp/
DOkHttpTransportTest.java22 import io.grpc.internal.FakeClock;
37 private final FakeClock fakeClock = new FakeClock();
/external/icing/icing/testing/
Dfake-clock_test.cc28 FakeClock fake_clock; in TEST()
39 FakeClock fake_clock; in TEST()
/external/openscreen/platform/impl/
Dtask_runner_unittest.cc90 FakeClock fake_clock{Clock::time_point(milliseconds(1337))}; in TEST()
102 FakeClock fake_clock{Clock::time_point(milliseconds(1337))}; in TEST()
130 FakeClock fake_clock{Clock::time_point(milliseconds(1337))}; in TEST()
153 FakeClock fake_clock{Clock::time_point(milliseconds(1337))}; in TEST()
185 FakeClock fake_clock{Clock::time_point(milliseconds(1337))}; in TEST()
/external/robolectric-shadows/utils/src/test/java/org/robolectric/util/
DPerfStatsCollectorTest.java18 private FakeClock fakeClock;
23 fakeClock = new FakeClock(); in setUp()
119 private static class FakeClock implements Clock { class in PerfStatsCollectorTest
/external/grpc-grpc-java/core/src/test/java/io/grpc/inprocess/
DInProcessChannelBuilderTest.java23 import io.grpc.internal.FakeClock;
52 new FakeClock().getScheduledExecutorService(); in scheduledExecutorService_custom()
/external/grpc-grpc-java/grpclb/src/test/java/io/grpc/grpclb/
DCachedSubchannelPoolTest.java39 import io.grpc.internal.FakeClock;
60 private static final FakeClock.TaskFilter SHUTDOWN_SCHEDULED_TASK_FILTER =
61 new FakeClock.TaskFilter() {
71 private final FakeClock clock = new FakeClock();
/external/crosvm/base/src/
Dtimer.rs6 AsRawDescriptor, FakeClock, FromRawDescriptor, IntoRawDescriptor, RawDescriptor, Result,
28 pub fn new(clock: Arc<Mutex<FakeClock>>) -> Self { in new()
/external/openscreen/platform/api/
Dsocket_integration_unittest.cc20 FakeClock clock(Clock::now()); in TEST()
38 FakeClock clock(Clock::now()); in TEST()
/external/exoplayer/tree/testutils/src/main/java/com/google/android/exoplayer2/testutil/
DFakeClock.java29 public class FakeClock implements Clock { class
44 public FakeClock(long initialTimeMs) { in FakeClock() method in FakeClock
55 public FakeClock(long bootTimeMs, long initialTimeMs) { in FakeClock() method in FakeClock

1234