Chromium Code Reviews| Index: webrtc/modules/desktop_capture/screen_capturer_x11.cc |
| diff --git a/webrtc/modules/desktop_capture/screen_capturer_x11.cc b/webrtc/modules/desktop_capture/screen_capturer_x11.cc |
| index 65e682b6f8bdc1bd28ba99d515077122fc105adb..875da0ebf3c5ae4dba85a1ff8da14d862297a07b 100644 |
| --- a/webrtc/modules/desktop_capture/screen_capturer_x11.cc |
| +++ b/webrtc/modules/desktop_capture/screen_capturer_x11.cc |
| @@ -21,6 +21,7 @@ |
| #include <X11/Xutil.h> |
| #include "webrtc/base/checks.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/differ.h" |
| @@ -28,7 +29,6 @@ |
| #include "webrtc/modules/desktop_capture/screen_capturer_helper.h" |
| #include "webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h" |
| #include "webrtc/system_wrappers/include/logging.h" |
| -#include "webrtc/system_wrappers/include/tick_util.h" |
| namespace webrtc { |
| namespace { |
| @@ -234,7 +234,7 @@ void ScreenCapturerLinux::Start(Callback* callback) { |
| } |
| void ScreenCapturerLinux::Capture(const DesktopRegion& region) { |
| - TickTime capture_start_time = TickTime::Now(); |
| + int64_t capture_start_time = rtc::TimeNanos(); |
|
stefan-webrtc
2016/04/19 09:19:12
_nanos
nisse-webrtc
2016/04/19 12:19:25
Done.
|
| queue_.MoveToNextFrame(); |
| @@ -274,7 +274,7 @@ void ScreenCapturerLinux::Capture(const DesktopRegion& region) { |
| DesktopFrame* result = CaptureScreen(); |
| last_invalid_region_ = result->updated_region(); |
| result->set_capture_time_ms( |
| - (TickTime::Now() - capture_start_time).Milliseconds()); |
| + (rtc::TimeNanos() - capture_start_time) / rtc::kNumNanosecsPerMillisec); |
| callback_->OnCaptureCompleted(result); |
| } |