Fix thread usage in PC level tests for getting to the IceConnected state
Bug: webrtc:11743
Change-Id: I18a6318c35b350b3d729bbd5ac1d25f035e6ad9d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178809
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31658}
diff --git a/api/test/time_controller.h b/api/test/time_controller.h
index 419bd20..bd3192d 100644
--- a/api/test/time_controller.h
+++ b/api/test/time_controller.h
@@ -60,6 +60,8 @@
// Waits until condition() == true, polling condition() in small time
// intervals.
+ // Returns true if condition() was evaluated to true before |max_duration|
+ // elapsed and false otherwise.
bool Wait(const std::function<bool()>& condition,
TimeDelta max_duration = TimeDelta::Seconds(5));
};