Use injected clock in test_audio_device_impl

Stops using the global clock methods from time_utils.

This CL was uploaded by an experimental version of git cl split
(https://crbug.com/389069356).

Bug: webrtc:42223992
Change-Id: Ia084aba3e8ee1a63fe06f8051fa54278f906a77d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/404961
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45373}
diff --git a/modules/audio_device/test_audio_device_impl.cc b/modules/audio_device/test_audio_device_impl.cc
index fe3d10d..80402d3 100644
--- a/modules/audio_device/test_audio_device_impl.cc
+++ b/modules/audio_device/test_audio_device_impl.cc
@@ -25,7 +25,6 @@
 #include "rtc_base/checks.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/task_utils/repeating_task.h"
-#include "rtc_base/time_utils.h"
 
 namespace webrtc {
 namespace {
@@ -175,7 +174,7 @@
       audio_buffer_->SetRecordedBuffer(
           recording_buffer_.data(),
           recording_buffer_.size() / capturer_->NumChannels(),
-          std::make_optional(TimeNanos()));
+          std::make_optional(env_.clock().CurrentTime().ns()));
       audio_buffer_->DeliverRecordedData();
     }
     if (!keep_capturing) {