16#include "pw_async/fake_dispatcher.h"
17#include "pw_unit_test/framework.h"
19namespace pw::async::test {
45 chrono::SystemClock::time_point
now() {
return dispatcher_.now(); }
54 bool RunUntil(chrono::SystemClock::time_point end_time) {
55 return dispatcher_.RunUntil(end_time);
62 return dispatcher_.RunFor(duration);
66 FakeDispatcher dispatcher_;
Definition: fake_dispatcher_fixture.h:39
FakeDispatcher & dispatcher()
Returns the FakeDispatcher that should be used for dependency injection.
Definition: fake_dispatcher_fixture.h:42
bool RunUntil(chrono::SystemClock::time_point end_time)
Definition: fake_dispatcher_fixture.h:54
chrono::SystemClock::time_point now()
Returns the current fake time.
Definition: fake_dispatcher_fixture.h:45
bool RunFor(chrono::SystemClock::duration duration)
Definition: fake_dispatcher_fixture.h:61
bool RunUntilIdle()
Definition: fake_dispatcher_fixture.h:49
Definition: framework_backend.h:693
std::chrono::duration< rep, period > duration
Alias for durations representable with this clock.
Definition: system_clock.h:86