async: add sleep_for sender
Sometimes it is useful to do the equivalent of
`std::this_thread::sleep_for` in a co-routine context. Add a
sender-based implementation to async.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9991eb40b7a1b12e61511f1200bc99fdcdbccf0a
diff --git a/src/async/context.cpp b/src/async/context.cpp
index 1dc9906..007a266 100644
--- a/src/async/context.cpp
+++ b/src/async/context.cpp
@@ -37,7 +37,7 @@
// Data to share with the worker.
context& ctx;
- std::chrono::microseconds timeout{};
+ event_t::time_resolution timeout{};
static task<> loop(context& ctx);
static void wait_once(context& ctx);