| Index: webrtc/modules/desktop_capture/screen_capturer_mac.mm
|
| diff --git a/webrtc/modules/desktop_capture/screen_capturer_mac.mm b/webrtc/modules/desktop_capture/screen_capturer_mac.mm
|
| index 1acbda2d6e33be35c5a03d484d8b6856df2e0261..bf6c72950c2139b4a82e1226737f618b1430eaf9 100644
|
| --- a/webrtc/modules/desktop_capture/screen_capturer_mac.mm
|
| +++ b/webrtc/modules/desktop_capture/screen_capturer_mac.mm
|
| @@ -25,6 +25,7 @@
|
| #include "webrtc/base/checks.h"
|
| #include "webrtc/base/constructormagic.h"
|
| #include "webrtc/base/macutils.h"
|
| +#include "webrtc/base/timeutils.h"
|
| #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
|
| #include "webrtc/modules/desktop_capture/desktop_frame.h"
|
| #include "webrtc/modules/desktop_capture/desktop_geometry.h"
|
| @@ -36,7 +37,6 @@
|
| #include "webrtc/modules/desktop_capture/screen_capturer_helper.h"
|
| #include "webrtc/modules/desktop_capture/shared_desktop_frame.h"
|
| #include "webrtc/system_wrappers/include/logging.h"
|
| -#include "webrtc/system_wrappers/include/tick_util.h"
|
|
|
| namespace webrtc {
|
|
|
| @@ -384,7 +384,7 @@ void ScreenCapturerMac::Start(Callback* callback) {
|
| }
|
|
|
| void ScreenCapturerMac::Capture(const DesktopRegion& region_to_capture) {
|
| - TickTime capture_start_time = TickTime::Now();
|
| + int64_t capture_start_time_nanos = rtc::TimeNanos();
|
|
|
| queue_.MoveToNextFrame();
|
| RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared());
|
| @@ -448,7 +448,8 @@ void ScreenCapturerMac::Capture(const DesktopRegion& region_to_capture) {
|
| desktop_config_monitor_->Unlock();
|
|
|
| new_frame->set_capture_time_ms(
|
| - (TickTime::Now() - capture_start_time).Milliseconds());
|
| + (rtc::TimeNanos() - capture_start_time_nanos) /
|
| + rtc::kNumNanosecsPerMillisec);
|
| callback_->OnCaptureCompleted(new_frame);
|
| }
|
|
|
|
|