We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd7346f commit ebf71a0Copy full SHA for ebf71a0
1 file changed
toolbox/io/Reactor.ut.cpp
@@ -153,14 +153,14 @@ BOOST_AUTO_TEST_CASE(ReactorHighPriorityHook)
153
154
auto [s1, s2] = socketpair(UnixStreamProtocol{});
155
156
- // This is handler for data on s1. It is an expensive function taking ~100ms
+ // This is handler for data on s1. It is an expensive function taking ~250ms
157
std::size_t yield_count = 0;
158
auto on_data_received = [&](CyclTime, int, unsigned) {
159
WallTime now = WallClock::now();
160
- WallTime end = now + 500ms;
+ WallTime end = now + 250ms;
161
while (now < end) {
162
- // wait for 100us, then yield
163
- auto next_stop = now + 1ms;
+ // wait for 1ms, then yield
+ auto next_stop = WallClock::now() + 1ms;
164
while (now < next_stop) {
165
now = WallClock::now();
166
}
0 commit comments