blob: 7f77f0afec79f34e3ebe323344bc2c05102b5e0e [file] [log] [blame]
Sebastian Jansson0d617cc2019-03-22 15:22:16 +01001# Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import("../../webrtc.gni")
10
philipel52c62df2020-01-29 10:16:44 +010011rtc_library("time_controller") {
12 testonly = true
13 sources = [
14 "external_time_controller.cc",
15 "external_time_controller.h",
16 "real_time_controller.cc",
17 "real_time_controller.h",
18 "simulated_process_thread.cc",
19 "simulated_process_thread.h",
20 "simulated_task_queue.cc",
21 "simulated_task_queue.h",
22 "simulated_thread.cc",
23 "simulated_thread.h",
24 "simulated_time_controller.cc",
25 "simulated_time_controller.h",
26 ]
Sebastian Jansson0d617cc2019-03-22 15:22:16 +010027
philipel52c62df2020-01-29 10:16:44 +010028 deps = [
29 "../../api:time_controller",
30 "../../api/task_queue",
31 "../../api/task_queue:default_task_queue_factory",
32 "../../api/units:time_delta",
33 "../../api/units:timestamp",
34 "../../modules:module_api",
35 "../../modules/utility:utility",
36 "../../rtc_base",
37 "../../rtc_base:checks",
38 "../../rtc_base:rtc_base_tests_utils",
39 "../../rtc_base:rtc_event",
40 "../../rtc_base/synchronization:sequence_checker",
41 "../../rtc_base/synchronization:yield_policy",
42 "../../rtc_base/task_utils:to_queued_task",
43 "../../system_wrappers",
44 "//third_party/abseil-cpp/absl/strings",
45 ]
46}
47
48if (rtc_include_tests) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +020049 rtc_library("time_controller_unittests") {
Sebastian Jansson0d617cc2019-03-22 15:22:16 +010050 testonly = true
51 sources = [
Bjorn A Mellemc4f86542019-11-21 10:37:18 -080052 "external_time_controller_unittest.cc",
Sebastian Jansson0d617cc2019-03-22 15:22:16 +010053 "simulated_time_controller_unittest.cc",
54 ]
55 deps = [
56 ":time_controller",
57 "../:test_support",
58 "../../rtc_base:rtc_base_approved",
59 "../../rtc_base:rtc_task_queue",
60 "../../rtc_base/task_utils:repeating_task",
Sebastian Jansson0d617cc2019-03-22 15:22:16 +010061 ]
62 }
63}