Implement basic network flow control (#2803)
Co-authored-by: Cameron Gutman <aicommander@gmail.com>
This commit is contained in:
parent
6607a28a68
commit
037c61dc99
9 changed files with 352 additions and 101 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue