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

Unified Diff: media/audio/fake_audio_consumer.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/fake_audio_consumer.h ('k') | media/audio/fake_audio_consumer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/fake_audio_consumer.cc
diff --git a/media/audio/fake_audio_consumer.cc b/media/audio/fake_audio_consumer.cc
index e70a74a5ea162cd83873d0f275fb7514f9487d4a..5232170c437466ce67709334512a0dd26c9c1b10 100644
--- a/media/audio/fake_audio_consumer.cc
+++ b/media/audio/fake_audio_consumer.cc
@@ -33,7 +33,7 @@ void FakeAudioConsumer::Start(const ReadCB& read_cb) {
DCHECK(read_cb_.is_null());
DCHECK(!read_cb.is_null());
read_cb_ = read_cb;
- next_read_time_ = base::Time::Now();
+ next_read_time_ = base::TimeTicks::Now();
read_task_cb_.Reset(base::Bind(
&FakeAudioConsumer::DoRead, base::Unretained(this)));
message_loop_->PostTask(FROM_HERE, read_task_cb_.callback());
@@ -53,7 +53,7 @@ void FakeAudioConsumer::DoRead() {
// Need to account for time spent here due to the cost of |read_cb_| as well
// as the imprecision of PostDelayedTask().
- base::Time now = base::Time::Now();
+ const base::TimeTicks now = base::TimeTicks::Now();
base::TimeDelta delay = next_read_time_ + buffer_duration_ - now;
// If we're behind, find the next nearest ontime interval.
« no previous file with comments | « media/audio/fake_audio_consumer.h ('k') | media/audio/fake_audio_consumer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698