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

Side by Side Diff: webrtc/system_wrappers/source/clock.cc

Issue 1613643004: Remove mutable from rtc::CriticalSection members. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 ref.counter_ms.QuadPart = timeGetTime(); 172 ref.counter_ms.QuadPart = timeGetTime();
173 Sleep(0); 173 Sleep(0);
174 } while ((ft0.dwHighDateTime == ft1.dwHighDateTime) && 174 } while ((ft0.dwHighDateTime == ft1.dwHighDateTime) &&
175 (ft0.dwLowDateTime == ft1.dwLowDateTime)); 175 (ft0.dwLowDateTime == ft1.dwLowDateTime));
176 ref.file_time = ft1; 176 ref.file_time = ft1;
177 timeEndPeriod(1); 177 timeEndPeriod(1);
178 return ref; 178 return ref;
179 } 179 }
180 180
181 // mutable as time-accessing functions are const. 181 // mutable as time-accessing functions are const.
182 mutable rtc::CriticalSection crit_; 182 rtc::CriticalSection crit_;
183 mutable DWORD last_time_ms_; 183 mutable DWORD last_time_ms_;
184 mutable LONG num_timer_wraps_; 184 mutable LONG num_timer_wraps_;
185 const ReferencePoint ref_point_; 185 const ReferencePoint ref_point_;
186 }; 186 };
187 187
188 #elif ((defined WEBRTC_LINUX) || (defined WEBRTC_MAC)) 188 #elif ((defined WEBRTC_LINUX) || (defined WEBRTC_MAC))
189 class UnixRealTimeClock : public RealTimeClock { 189 class UnixRealTimeClock : public RealTimeClock {
190 public: 190 public:
191 UnixRealTimeClock() {} 191 UnixRealTimeClock() {}
192 192
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 void SimulatedClock::AdvanceTimeMilliseconds(int64_t milliseconds) { 262 void SimulatedClock::AdvanceTimeMilliseconds(int64_t milliseconds) {
263 AdvanceTimeMicroseconds(1000 * milliseconds); 263 AdvanceTimeMicroseconds(1000 * milliseconds);
264 } 264 }
265 265
266 void SimulatedClock::AdvanceTimeMicroseconds(int64_t microseconds) { 266 void SimulatedClock::AdvanceTimeMicroseconds(int64_t microseconds) {
267 WriteLockScoped synchronize(*lock_); 267 WriteLockScoped synchronize(*lock_);
268 time_us_ += microseconds; 268 time_us_ += microseconds;
269 } 269 }
270 270
271 }; // namespace webrtc 271 }; // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_processing/video_processing_impl.h ('k') | webrtc/test/fake_audio_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698