| ... | ... | @@ -389,16 +389,6 @@ test "std.ResetEvent" { |
| 389 | 389 | testing.expect(event.isSet() == false); |
| 390 | 390 | testing.expect(event.reset() == false); |
| 391 | 391 | |
| 392 | | // test waiting timeout |
| 393 | | const delay = 100 * time.millisecond; |
| 394 | | const error_margin = 50 * time.millisecond; |
| 395 | | |
| 396 | | var timer = time.Timer.start() catch unreachable; |
| 397 | | testing.expectError(ResetEvent.WaitError.TimedOut, event.wait(delay)); |
| 398 | | const elapsed = timer.read(); |
| 399 | | testing.expect(elapsed >= delay - error_margin); |
| 400 | | testing.expect(elapsed <= delay + error_margin); |
| 401 | | |
| 402 | 392 | // test cross thread signaling |
| 403 | 393 | const Context = struct { |
| 404 | 394 | event: ResetEvent, |