| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |