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

Unified Diff: webrtc/base/fakeclock.h

Issue 2515653002: Convert rtc_event_log from webrtc::Clock to rtc::TimeMicros. (Closed)
Patch Set: Rebase. Created 4 years 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 | « webrtc/api/peerconnection.cc ('k') | webrtc/logging/rtc_event_log/rtc_event_log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/fakeclock.h
diff --git a/webrtc/base/fakeclock.h b/webrtc/base/fakeclock.h
index 7fa101558fc741311e19a1a1ca93abcc056a93df..eb78cf864de57b6267948c0c4e7dc83fc3ac0d13 100644
--- a/webrtc/base/fakeclock.h
+++ b/webrtc/base/fakeclock.h
@@ -32,9 +32,14 @@ class FakeClock : public ClockInterface {
// Should only be used to set a time in the future.
void SetTimeNanos(int64_t nanos);
+ void SetTimeMicros(int64_t micros) {
+ SetTimeNanos(kNumNanosecsPerMicrosec * micros);
+ }
void AdvanceTime(TimeDelta delta);
-
+ void AdvanceTimeMicros(int64_t micros) {
+ AdvanceTime(rtc::TimeDelta::FromMicroseconds(micros));
+ }
private:
CriticalSection lock_;
int64_t time_ GUARDED_BY(lock_) = 0;
« no previous file with comments | « webrtc/api/peerconnection.cc ('k') | webrtc/logging/rtc_event_log/rtc_event_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698