blob: 10c1b20cbe1da411b973d95f0cd67fbde0f47089 [file] [log] [blame]
Sebastian Jansson0d617cc2019-03-22 15:22:16 +01001/*
2 * Copyright 2019 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#ifndef TEST_TIME_CONTROLLER_REAL_TIME_CONTROLLER_H_
11#define TEST_TIME_CONTROLLER_REAL_TIME_CONTROLLER_H_
12
13#include <memory>
14
15#include "test/time_controller/time_controller.h"
16
17namespace webrtc {
18class RealTimeController : public TimeController {
19 public:
20 Clock* GetClock() override;
21 TaskQueueFactory* GetTaskQueueFactory() override;
22 std::unique_ptr<ProcessThread> CreateProcessThread(
23 const char* thread_name) override;
24 void Sleep(TimeDelta duration) override;
25 void InvokeWithControlledYield(std::function<void()> closure) override;
26};
27
Sebastian Jansson5d97f552019-04-15 14:43:03 +020028RealTimeController* GlobalRealTimeController();
29
Sebastian Jansson0d617cc2019-03-22 15:22:16 +010030} // namespace webrtc
31
32#endif // TEST_TIME_CONTROLLER_REAL_TIME_CONTROLLER_H_