16#include "pw_async/fake_dispatcher.h"
17#include "pw_unit_test/framework.h"
19namespace pw::async::test {
47 chrono::SystemClock::time_point
now() {
return dispatcher_.now(); }
56 bool RunUntil(chrono::SystemClock::time_point end_time) {
57 return dispatcher_.RunUntil(end_time);
64 return dispatcher_.RunFor(duration);
68 FakeDispatcher dispatcher_;
Definition: fake_dispatcher_fixture.h:41
Definition: framework_backend.h:698
FakeDispatcher & dispatcher()
Returns the FakeDispatcher that should be used for dependency injection.
Definition: fake_dispatcher_fixture.h:44
bool RunUntil(chrono::SystemClock::time_point end_time)
Definition: fake_dispatcher_fixture.h:56
chrono::SystemClock::time_point now()
Returns the current fake time.
Definition: fake_dispatcher_fixture.h:47
bool RunFor(chrono::SystemClock::duration duration)
Definition: fake_dispatcher_fixture.h:63
bool RunUntilIdle()
Definition: fake_dispatcher_fixture.h:51
std::chrono::duration< rep, period > duration
Alias for durations representable with this clock.
Definition: system_clock.h:90