Implement basic network flow control (#2803)
Co-authored-by: Cameron Gutman <aicommander@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user