From 55f9635f8818614d1c0e5f2dbfc6eb3de18a7107 Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Sun, 1 Sep 2024 13:24:09 +0200 Subject: Playing around with dependencies. I need to think about the potential async codec behaviours --- modules/io/c++/io_unix.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'modules/io') diff --git a/modules/io/c++/io_unix.cpp b/modules/io/c++/io_unix.cpp index 2c6cf00..37af107 100644 --- a/modules/io/c++/io_unix.cpp +++ b/modules/io/c++/io_unix.cpp @@ -207,14 +207,13 @@ public: void wait() override { poll_impl(-1); } - void wait(const std::chrono::steady_clock::duration &duration) override { - poll_impl( - std::chrono::duration_cast(duration) - .count()); + void wait_for(uint64_t nanosec) override { + poll_impl(nanosec/1000); } void - wait(const std::chrono::steady_clock::time_point &time_point) override { + wait_until(uint64_t nanosec) override { auto now = std::chrono::steady_clock::now(); + std::chrono::steady_clock::time_point time_point = nanosec; if (time_point <= now) { poll(); } else { -- cgit v1.2.3