Make MessageQueue processing an optional feature of FakeClock

This is used to avoid thread processing in simulated time
controller. This saves up to 30% execution time in debug builds.

Bug: webrtc:10365
Change-Id: Ie83dfb2468d371e4687d28c776acf7e23eb411d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133173
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27666}
diff --git a/rtc_base/time_utils_unittest.cc b/rtc_base/time_utils_unittest.cc
index b736ad8..aeb9daf 100644
--- a/rtc_base/time_utils_unittest.cc
+++ b/rtc_base/time_utils_unittest.cc
@@ -217,11 +217,11 @@
   FakeClock clock;
   SetClockForTesting(&clock);
 
-  clock.SetTimeNanos(987654321);
+  clock.SetTime(webrtc::Timestamp::us(987654));
   EXPECT_EQ(987u, Time32());
   EXPECT_EQ(987, TimeMillis());
   EXPECT_EQ(987654, TimeMicros());
-  EXPECT_EQ(987654321, TimeNanos());
+  EXPECT_EQ(987654000, TimeNanos());
   EXPECT_EQ(1000u, TimeAfter(13));
 
   SetClockForTesting(nullptr);
@@ -234,12 +234,12 @@
   EXPECT_EQ(0, clock.TimeNanos());
 }
 
-TEST(FakeClock, SetTimeNanos) {
+TEST(FakeClock, SetTime) {
   FakeClock clock;
-  clock.SetTimeNanos(123);
-  EXPECT_EQ(123, clock.TimeNanos());
-  clock.SetTimeNanos(456);
-  EXPECT_EQ(456, clock.TimeNanos());
+  clock.SetTime(webrtc::Timestamp::us(123));
+  EXPECT_EQ(123000, clock.TimeNanos());
+  clock.SetTime(webrtc::Timestamp::us(456));
+  EXPECT_EQ(456000, clock.TimeNanos());
 }
 
 TEST(FakeClock, AdvanceTime) {
@@ -261,7 +261,7 @@
 TEST(FakeClock, SettingTimeWakesThreads) {
   int64_t real_start_time_ms = TimeMillis();
 
-  FakeClock clock;
+  ThreadProcessingFakeClock clock;
   SetClockForTesting(&clock);
 
   std::unique_ptr<Thread> worker(Thread::CreateWithSocketServer());