You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #include <Windows.h>
  11. #include <assert.h>
  12. #include <conio.h>
  13. #include <stdio.h>
  14. #include "rtc_base/task_queue_for_test.h"
  15. #include "test/run_loop.h"
  16. namespace webrtc {
  17. namespace test {
  18. void PressEnterToContinue(TaskQueueBase* task_queue) {
  19. puts(">> Press ENTER to continue...");
  20. while (!_kbhit() || _getch() != '\r') {
  21. // Drive the message loop for the thread running the task_queue
  22. SendTask(RTC_FROM_HERE, task_queue, [&]() {
  23. MSG msg;
  24. if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
  25. TranslateMessage(&msg);
  26. DispatchMessage(&msg);
  27. }
  28. });
  29. }
  30. }
  31. } // namespace test
  32. } // namespace webrtc