Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(771)

Unified Diff: media/audio/linux/alsa_input.cc

Issue 16823003: Replace erroneous use of base::Time with base::TimeTicks throughout media code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/PresubmitPromptWarning/PresubmitPromptOrNotify/ Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/linux/alsa_input.h ('k') | media/audio/mac/audio_input_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/linux/alsa_input.cc
diff --git a/media/audio/linux/alsa_input.cc b/media/audio/linux/alsa_input.cc
index bbbee050fd100ee3686fe326561a620e4d6f35e0..3f20158714ad72cc514d383fc4c3575529d1c9d8 100644
--- a/media/audio/linux/alsa_input.cc
+++ b/media/audio/linux/alsa_input.cc
@@ -119,7 +119,7 @@ void AlsaPcmInputStream::Start(AudioInputCallback* callback) {
// buffer might have got filled, to accommodate some delays in the audio
// driver. This could also give us a smooth read sequence going forward.
base::TimeDelta delay = buffer_duration_ + buffer_duration_ / 2;
- next_read_time_ = base::Time::Now() + delay;
+ next_read_time_ = base::TimeTicks::Now() + delay;
base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&AlsaPcmInputStream::ReadAudio, weak_factory_.GetWeakPtr()),
@@ -182,7 +182,7 @@ void AlsaPcmInputStream::ReadAudio() {
// Even Though read callback was behind schedule, there is no data, so
// reset the next_read_time_.
if (read_callback_behind_schedule_) {
- next_read_time_ = base::Time::Now();
+ next_read_time_ = base::TimeTicks::Now();
read_callback_behind_schedule_ = false;
}
@@ -218,7 +218,7 @@ void AlsaPcmInputStream::ReadAudio() {
}
next_read_time_ += buffer_duration_;
- base::TimeDelta delay = next_read_time_ - base::Time::Now();
+ base::TimeDelta delay = next_read_time_ - base::TimeTicks::Now();
if (delay < base::TimeDelta()) {
DVLOG(1) << "Audio read callback behind schedule by "
<< (buffer_duration_ - delay).InMicroseconds()
« no previous file with comments | « media/audio/linux/alsa_input.h ('k') | media/audio/mac/audio_input_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698