summaryrefslogtreecommitdiff
path: root/system_wrappers
diff options
context:
space:
mode:
authorAndroid Chromium Automerger <chromium-automerger@android>2014-06-16 14:43:57 +0000
committerAndroid Chromium Automerger <chromium-automerger@android>2014-06-16 14:43:57 +0000
commitc7fcada57f3f930a6efb5d57ff2931e8d9c12041 (patch)
treebc596392a83217f709460f6da21b33625825875b /system_wrappers
parentadda09e50de65c9a17d8d24dbbb421d39da1fe00 (diff)
parent5fcef2b6df45ceab39ee96a616ab0a4d3c63b83a (diff)
downloadwebrtc-c7fcada57f3f930a6efb5d57ff2931e8d9c12041.tar.gz
Merge third_party/webrtc from https://chromium.googlesource.com/external/webrtc/trunk/webrtc.git at 5fcef2b6df45ceab39ee96a616ab0a4d3c63b83a
This commit was generated by merge_from_chromium.py. Change-Id: I58be5a5957c0a6b1be9beac86538af8d38058e9e
Diffstat (limited to 'system_wrappers')
-rw-r--r--system_wrappers/interface/clock.h17
-rw-r--r--system_wrappers/source/OWNERS1
-rw-r--r--system_wrappers/source/clock.cc17
3 files changed, 19 insertions, 16 deletions
diff --git a/system_wrappers/interface/clock.h b/system_wrappers/interface/clock.h
index 38ce0d58..c03f976d 100644
--- a/system_wrappers/interface/clock.h
+++ b/system_wrappers/interface/clock.h
@@ -32,17 +32,17 @@ class Clock {
// Return a timestamp in milliseconds relative to some arbitrary source; the
// source is fixed for this clock.
- virtual int64_t TimeInMilliseconds() = 0;
+ virtual int64_t TimeInMilliseconds() const = 0;
// Return a timestamp in microseconds relative to some arbitrary source; the
// source is fixed for this clock.
- virtual int64_t TimeInMicroseconds() = 0;
+ virtual int64_t TimeInMicroseconds() const = 0;
// Retrieve an NTP absolute timestamp in seconds and fractions of a second.
- virtual void CurrentNtp(uint32_t& seconds, uint32_t& fractions) = 0;
+ virtual void CurrentNtp(uint32_t& seconds, uint32_t& fractions) const = 0;
// Retrieve an NTP absolute timestamp in milliseconds.
- virtual int64_t CurrentNtpInMilliseconds() = 0;
+ virtual int64_t CurrentNtpInMilliseconds() const = 0;
// Converts an NTP timestamp to a millisecond timestamp.
static int64_t NtpToMs(uint32_t seconds, uint32_t fractions);
@@ -59,17 +59,18 @@ class SimulatedClock : public Clock {
// Return a timestamp in milliseconds relative to some arbitrary source; the
// source is fixed for this clock.
- virtual int64_t TimeInMilliseconds() OVERRIDE;
+ virtual int64_t TimeInMilliseconds() const OVERRIDE;
// Return a timestamp in microseconds relative to some arbitrary source; the
// source is fixed for this clock.
- virtual int64_t TimeInMicroseconds() OVERRIDE;
+ virtual int64_t TimeInMicroseconds() const OVERRIDE;
// Retrieve an NTP absolute timestamp in milliseconds.
- virtual void CurrentNtp(uint32_t& seconds, uint32_t& fractions) OVERRIDE;
+ virtual void CurrentNtp(uint32_t& seconds,
+ uint32_t& fractions) const OVERRIDE;
// Converts an NTP timestamp to a millisecond timestamp.
- virtual int64_t CurrentNtpInMilliseconds() OVERRIDE;
+ virtual int64_t CurrentNtpInMilliseconds() const OVERRIDE;
// Advance the simulated clock with a given number of milliseconds or
// microseconds.
diff --git a/system_wrappers/source/OWNERS b/system_wrappers/source/OWNERS
index 3ee6b4bf..bbffda7e 100644
--- a/system_wrappers/source/OWNERS
+++ b/system_wrappers/source/OWNERS
@@ -1,3 +1,4 @@
+per-file *.isolate=kjellander@webrtc.org
# These are for the common case of adding or renaming files. If you're doing
# structural changes, please get a review from a reviewer in this file.
diff --git a/system_wrappers/source/clock.cc b/system_wrappers/source/clock.cc
index aa80f8fb..33eb8561 100644
--- a/system_wrappers/source/clock.cc
+++ b/system_wrappers/source/clock.cc
@@ -129,18 +129,19 @@ void get_time(WindowsHelpTimer* help_timer, FILETIME& current_time) {
class RealTimeClock : public Clock {
// Return a timestamp in milliseconds relative to some arbitrary source; the
// source is fixed for this clock.
- virtual int64_t TimeInMilliseconds() OVERRIDE {
+ virtual int64_t TimeInMilliseconds() const OVERRIDE {
return TickTime::MillisecondTimestamp();
}
// Return a timestamp in microseconds relative to some arbitrary source; the
// source is fixed for this clock.
- virtual int64_t TimeInMicroseconds() OVERRIDE {
+ virtual int64_t TimeInMicroseconds() const OVERRIDE {
return TickTime::MicrosecondTimestamp();
}
// Retrieve an NTP absolute timestamp in seconds and fractions of a second.
- virtual void CurrentNtp(uint32_t& seconds, uint32_t& fractions) OVERRIDE {
+ virtual void CurrentNtp(uint32_t& seconds,
+ uint32_t& fractions) const OVERRIDE {
timeval tv = CurrentTimeVal();
double microseconds_in_seconds;
Adjust(tv, &seconds, &microseconds_in_seconds);
@@ -149,7 +150,7 @@ class RealTimeClock : public Clock {
}
// Retrieve an NTP absolute timestamp in milliseconds.
- virtual int64_t CurrentNtpInMilliseconds() OVERRIDE {
+ virtual int64_t CurrentNtpInMilliseconds() const OVERRIDE {
timeval tv = CurrentTimeVal();
uint32_t seconds;
double microseconds_in_seconds;
@@ -270,24 +271,24 @@ SimulatedClock::SimulatedClock(int64_t initial_time_us)
SimulatedClock::~SimulatedClock() {
}
-int64_t SimulatedClock::TimeInMilliseconds() {
+int64_t SimulatedClock::TimeInMilliseconds() const {
ReadLockScoped synchronize(*lock_);
return (time_us_ + 500) / 1000;
}
-int64_t SimulatedClock::TimeInMicroseconds() {
+int64_t SimulatedClock::TimeInMicroseconds() const {
ReadLockScoped synchronize(*lock_);
return time_us_;
}
-void SimulatedClock::CurrentNtp(uint32_t& seconds, uint32_t& fractions) {
+void SimulatedClock::CurrentNtp(uint32_t& seconds, uint32_t& fractions) const {
int64_t now_ms = TimeInMilliseconds();
seconds = (now_ms / 1000) + kNtpJan1970;
fractions =
static_cast<uint32_t>((now_ms % 1000) * kMagicNtpFractionalUnit / 1000);
}
-int64_t SimulatedClock::CurrentNtpInMilliseconds() {
+int64_t SimulatedClock::CurrentNtpInMilliseconds() const {
return TimeInMilliseconds() + 1000 * static_cast<int64_t>(kNtpJan1970);
}