Implement basic network flow control (#2803)

Co-authored-by: Cameron Gutman <aicommander@gmail.com>
This commit is contained in:
ns6089
2024-07-11 03:03:16 +03:00
committed by GitHub
parent 6607a28a68
commit 037c61dc99
9 changed files with 352 additions and 101 deletions

View File

@@ -933,4 +933,21 @@ namespace platf {
return std::make_unique<deinit_t>();
}
class linux_high_precision_timer: public high_precision_timer {
public:
void
sleep_for(const std::chrono::nanoseconds &duration) override {
std::this_thread::sleep_for(duration);
}
operator bool() override {
return true;
}
};
std::unique_ptr<high_precision_timer>
create_high_precision_timer() {
return std::make_unique<linux_high_precision_timer>();
}
} // namespace platf