blob: 38d95f5c2ddd563aaa80f2b85760fe3c0dee697c [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
wu@webrtc.org6e6ea042012-03-12 19:42:22 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11// System independant wrapper for polling elapsed time in ms and us.
12// The implementation works in the tick domain which can be mapped over to the
13// time domain.
14#ifndef WEBRTC_SYSTEM_WRAPPERS_INTERFACE_TICK_UTIL_H_
15#define WEBRTC_SYSTEM_WRAPPERS_INTERFACE_TICK_UTIL_H_
16
17#if _WIN32
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000018// Note: These includes must be in this order since mmsystem depends on windows.
niklase@google.com470e71d2011-07-07 08:21:25 +000019#include <windows.h>
20#include <mmsystem.h>
21#elif WEBRTC_LINUX
22#include <ctime>
wu@webrtc.org6e6ea042012-03-12 19:42:22 +000023#elif WEBRTC_MAC
24#include <mach/mach_time.h>
25#include <string.h>
niklase@google.com470e71d2011-07-07 08:21:25 +000026#else
27#include <sys/time.h>
28#include <time.h>
29#endif
30
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000031#include "webrtc/typedefs.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000032
33namespace webrtc {
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000034
niklase@google.com470e71d2011-07-07 08:21:25 +000035class TickInterval;
36
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000037// Class representing the current time.
38class TickTime {
39 public:
40 TickTime();
pbos@webrtc.org046deb92013-04-09 09:06:11 +000041 explicit TickTime(int64_t ticks);
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +000042
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000043 // Current time in the tick domain.
44 static TickTime Now();
niklase@google.com470e71d2011-07-07 08:21:25 +000045
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000046 // Now in the time domain in ms.
pbos@webrtc.org046deb92013-04-09 09:06:11 +000047 static int64_t MillisecondTimestamp();
niklase@google.com470e71d2011-07-07 08:21:25 +000048
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000049 // Now in the time domain in us.
pbos@webrtc.org046deb92013-04-09 09:06:11 +000050 static int64_t MicrosecondTimestamp();
niklase@google.com470e71d2011-07-07 08:21:25 +000051
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000052 // Returns the number of ticks in the tick domain.
pbos@webrtc.org046deb92013-04-09 09:06:11 +000053 int64_t Ticks() const;
niklase@google.com470e71d2011-07-07 08:21:25 +000054
pbos@webrtc.org046deb92013-04-09 09:06:11 +000055 static int64_t MillisecondsToTicks(const int64_t ms);
niklase@google.com470e71d2011-07-07 08:21:25 +000056
pbos@webrtc.org046deb92013-04-09 09:06:11 +000057 static int64_t TicksToMilliseconds(const int64_t ticks);
niklase@google.com470e71d2011-07-07 08:21:25 +000058
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000059 // Returns a TickTime that is ticks later than the passed TickTime.
pbos@webrtc.org046deb92013-04-09 09:06:11 +000060 friend TickTime operator+(const TickTime lhs, const int64_t ticks);
61 TickTime& operator+=(const int64_t& ticks);
niklase@google.com470e71d2011-07-07 08:21:25 +000062
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000063 // Returns a TickInterval that is the difference in ticks beween rhs and lhs.
64 friend TickInterval operator-(const TickTime& lhs, const TickTime& rhs);
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +000065
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000066 // Call to engage the fake clock. This is useful for tests since relying on
67 // a real clock often makes the test flaky.
pbos@webrtc.org046deb92013-04-09 09:06:11 +000068 static void UseFakeClock(int64_t start_millisecond);
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +000069
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000070 // Advance the fake clock. Must be called after UseFakeClock.
pbos@webrtc.org046deb92013-04-09 09:06:11 +000071 static void AdvanceFakeClock(int64_t milliseconds);
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +000072
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000073 private:
pbos@webrtc.org046deb92013-04-09 09:06:11 +000074 static int64_t QueryOsForTicks();
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +000075
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000076 static bool use_fake_clock_;
pbos@webrtc.org046deb92013-04-09 09:06:11 +000077 static int64_t fake_ticks_;
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +000078
pbos@webrtc.org046deb92013-04-09 09:06:11 +000079 int64_t ticks_;
niklase@google.com470e71d2011-07-07 08:21:25 +000080};
81
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000082// Represents a time delta in ticks.
83class TickInterval {
84 public:
85 TickInterval();
niklase@google.com470e71d2011-07-07 08:21:25 +000086
pbos@webrtc.org046deb92013-04-09 09:06:11 +000087 int64_t Milliseconds() const;
88 int64_t Microseconds() const;
niklase@google.com470e71d2011-07-07 08:21:25 +000089
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000090 // Returns the sum of two TickIntervals as a TickInterval.
91 friend TickInterval operator+(const TickInterval& lhs,
92 const TickInterval& rhs);
93 TickInterval& operator+=(const TickInterval& rhs);
niklase@google.com470e71d2011-07-07 08:21:25 +000094
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +000095 // Returns a TickInterval corresponding to rhs - lhs.
96 friend TickInterval operator-(const TickInterval& lhs,
97 const TickInterval& rhs);
98 TickInterval& operator-=(const TickInterval& rhs);
niklase@google.com470e71d2011-07-07 08:21:25 +000099
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000100 friend bool operator>(const TickInterval& lhs, const TickInterval& rhs);
101 friend bool operator<=(const TickInterval& lhs, const TickInterval& rhs);
102 friend bool operator<(const TickInterval& lhs, const TickInterval& rhs);
103 friend bool operator>=(const TickInterval& lhs, const TickInterval& rhs);
kjellander@webrtc.org9e7774f2011-09-23 11:33:31 +0000104
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000105 private:
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000106 explicit TickInterval(int64_t interval);
niklase@google.com470e71d2011-07-07 08:21:25 +0000107
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000108 friend class TickTime;
109 friend TickInterval operator-(const TickTime& lhs, const TickTime& rhs);
niklase@google.com470e71d2011-07-07 08:21:25 +0000110
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000111 private:
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000112 int64_t interval_;
niklase@google.com470e71d2011-07-07 08:21:25 +0000113};
114
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000115inline TickInterval operator+(const TickInterval& lhs,
116 const TickInterval& rhs) {
117 return TickInterval(lhs.interval_ + rhs.interval_);
niklase@google.com470e71d2011-07-07 08:21:25 +0000118}
119
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000120inline TickInterval operator-(const TickInterval& lhs,
121 const TickInterval& rhs) {
122 return TickInterval(lhs.interval_ - rhs.interval_);
niklase@google.com470e71d2011-07-07 08:21:25 +0000123}
124
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000125inline TickInterval operator-(const TickTime& lhs, const TickTime& rhs) {
126 return TickInterval(lhs.ticks_ - rhs.ticks_);
niklase@google.com470e71d2011-07-07 08:21:25 +0000127}
128
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000129inline TickTime operator+(const TickTime lhs, const int64_t ticks) {
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000130 TickTime time = lhs;
131 time.ticks_ += ticks;
132 return time;
niklase@google.com470e71d2011-07-07 08:21:25 +0000133}
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000134
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000135inline bool operator>(const TickInterval& lhs, const TickInterval& rhs) {
136 return lhs.interval_ > rhs.interval_;
kjellander@webrtc.org9e7774f2011-09-23 11:33:31 +0000137}
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000138
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000139inline bool operator<=(const TickInterval& lhs, const TickInterval& rhs) {
140 return lhs.interval_ <= rhs.interval_;
kjellander@webrtc.org9e7774f2011-09-23 11:33:31 +0000141}
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000142
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000143inline bool operator<(const TickInterval& lhs, const TickInterval& rhs) {
144 return lhs.interval_ <= rhs.interval_;
kjellander@webrtc.org9e7774f2011-09-23 11:33:31 +0000145}
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000146
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000147inline bool operator>=(const TickInterval& lhs, const TickInterval& rhs) {
148 return lhs.interval_ >= rhs.interval_;
kjellander@webrtc.org9e7774f2011-09-23 11:33:31 +0000149}
niklase@google.com470e71d2011-07-07 08:21:25 +0000150
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000151inline TickTime::TickTime()
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000152 : ticks_(0) {
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000153}
154
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000155inline TickTime::TickTime(int64_t ticks)
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000156 : ticks_(ticks) {
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000157}
158
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000159inline TickTime TickTime::Now() {
160 if (use_fake_clock_)
161 return TickTime(fake_ticks_);
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000162 else
163 return TickTime(QueryOsForTicks());
164}
165
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000166inline int64_t TickTime::QueryOsForTicks() {
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000167 TickTime result;
niklase@google.com470e71d2011-07-07 08:21:25 +0000168#if _WIN32
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000169 // TODO(wu): Remove QueryPerformanceCounter implementation.
170#ifdef USE_QUERY_PERFORMANCE_COUNTER
171 // QueryPerformanceCounter returns the value from the TSC which is
172 // incremented at the CPU frequency. The algorithm used requires
173 // the CPU frequency to be constant. Technology like speed stepping
174 // which has variable CPU frequency will therefore yield unpredictable,
175 // incorrect time estimations.
176 LARGE_INTEGER qpcnt;
177 QueryPerformanceCounter(&qpcnt);
178 result.ticks_ = qpcnt.QuadPart;
sjlee@webrtc.org4b425082012-09-10 17:58:21 +0000179#else
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000180 static volatile LONG last_time_get_time = 0;
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000181 static volatile int64_t num_wrap_time_get_time = 0;
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000182 volatile LONG* last_time_get_time_ptr = &last_time_get_time;
183 DWORD now = timeGetTime();
184 // Atomically update the last gotten time
185 DWORD old = InterlockedExchange(last_time_get_time_ptr, now);
186 if (now < old) {
187 // If now is earlier than old, there may have been a race between
188 // threads.
189 // 0x0fffffff ~3.1 days, the code will not take that long to execute
190 // so it must have been a wrap around.
191 if (old > 0xf0000000 && now < 0x0fffffff) {
192 num_wrap_time_get_time++;
wu@webrtc.org6e6ea042012-03-12 19:42:22 +0000193 }
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000194 }
195 result.ticks_ = now + (num_wrap_time_get_time << 32);
niklase@google.com470e71d2011-07-07 08:21:25 +0000196#endif
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000197#elif defined(WEBRTC_LINUX)
198 struct timespec ts;
199 // TODO(wu): Remove CLOCK_REALTIME implementation.
200#ifdef WEBRTC_CLOCK_TYPE_REALTIME
201 clock_gettime(CLOCK_REALTIME, &ts);
202#else
203 clock_gettime(CLOCK_MONOTONIC, &ts);
204#endif
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000205 result.ticks_ = 1000000000LL * static_cast<int64_t>(ts.tv_sec) +
206 static_cast<int64_t>(ts.tv_nsec);
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000207#elif defined(WEBRTC_MAC)
208 static mach_timebase_info_data_t timebase;
209 if (timebase.denom == 0) {
210 // Get the timebase if this is the first time we run.
211 // Recommended by Apple's QA1398.
212 kern_return_t retval = mach_timebase_info(&timebase);
213 if (retval != KERN_SUCCESS) {
214 // TODO(wu): Implement CHECK similar to chrome for all the platforms.
215 // Then replace this with a CHECK(retval == KERN_SUCCESS);
216#ifndef WEBRTC_IOS
217 asm("int3");
218#else
219 __builtin_trap();
220#endif // WEBRTC_SYSTEM_WRAPPERS_INTERFACE_TICK_UTIL_H_
221 }
222 }
223 // Use timebase to convert absolute time tick units into nanoseconds.
224 result.ticks_ = mach_absolute_time() * timebase.numer / timebase.denom;
225#else
226 struct timeval tv;
227 gettimeofday(&tv, NULL);
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000228 result.ticks_ = 1000000LL * static_cast<int64_t>(tv.tv_sec) +
229 static_cast<int64_t>(tv.tv_usec);
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000230#endif
231 return result.ticks_;
niklase@google.com470e71d2011-07-07 08:21:25 +0000232}
233
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000234inline int64_t TickTime::MillisecondTimestamp() {
235 int64_t ticks = TickTime::Now().Ticks();
niklase@google.com470e71d2011-07-07 08:21:25 +0000236#if _WIN32
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000237#ifdef USE_QUERY_PERFORMANCE_COUNTER
238 LARGE_INTEGER qpfreq;
239 QueryPerformanceFrequency(&qpfreq);
240 return (ticks * 1000) / qpfreq.QuadPart;
niklase@google.com470e71d2011-07-07 08:21:25 +0000241#else
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000242 return ticks;
243#endif
244#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
245 return ticks / 1000000LL;
246#else
247 return ticks / 1000LL;
niklase@google.com470e71d2011-07-07 08:21:25 +0000248#endif
249}
250
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000251inline int64_t TickTime::MicrosecondTimestamp() {
252 int64_t ticks = TickTime::Now().Ticks();
niklase@google.com470e71d2011-07-07 08:21:25 +0000253#if _WIN32
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000254#ifdef USE_QUERY_PERFORMANCE_COUNTER
255 LARGE_INTEGER qpfreq;
256 QueryPerformanceFrequency(&qpfreq);
257 return (ticks * 1000) / (qpfreq.QuadPart / 1000);
niklase@google.com470e71d2011-07-07 08:21:25 +0000258#else
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000259 return ticks * 1000LL;
260#endif
261#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
262 return ticks / 1000LL;
263#else
264 return ticks;
niklase@google.com470e71d2011-07-07 08:21:25 +0000265#endif
266}
267
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000268inline int64_t TickTime::Ticks() const {
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000269 return ticks_;
niklase@google.com470e71d2011-07-07 08:21:25 +0000270}
271
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000272inline int64_t TickTime::MillisecondsToTicks(const int64_t ms) {
niklase@google.com470e71d2011-07-07 08:21:25 +0000273#if _WIN32
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000274#ifdef USE_QUERY_PERFORMANCE_COUNTER
275 LARGE_INTEGER qpfreq;
276 QueryPerformanceFrequency(&qpfreq);
277 return (qpfreq.QuadPart * ms) / 1000;
niklase@google.com470e71d2011-07-07 08:21:25 +0000278#else
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000279 return ms;
280#endif
281#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
282 return ms * 1000000LL;
283#else
284 return ms * 1000LL;
niklase@google.com470e71d2011-07-07 08:21:25 +0000285#endif
286}
287
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000288inline int64_t TickTime::TicksToMilliseconds(const int64_t ticks) {
niklase@google.com470e71d2011-07-07 08:21:25 +0000289#if _WIN32
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000290#ifdef USE_QUERY_PERFORMANCE_COUNTER
291 LARGE_INTEGER qpfreq;
292 QueryPerformanceFrequency(&qpfreq);
293 return (ticks * 1000) / qpfreq.QuadPart;
niklase@google.com470e71d2011-07-07 08:21:25 +0000294#else
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000295 return ticks;
296#endif
297#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
298 return ticks / 1000000LL;
299#else
300 return ticks / 1000LL;
niklase@google.com470e71d2011-07-07 08:21:25 +0000301#endif
302}
303
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000304inline TickTime& TickTime::operator+=(const int64_t& ticks) {
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000305 ticks_ += ticks;
306 return *this;
niklase@google.com470e71d2011-07-07 08:21:25 +0000307}
308
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000309inline TickInterval::TickInterval() : interval_(0) {
niklase@google.com470e71d2011-07-07 08:21:25 +0000310}
311
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000312inline TickInterval::TickInterval(const int64_t interval)
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000313 : interval_(interval) {
niklase@google.com470e71d2011-07-07 08:21:25 +0000314}
315
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000316inline int64_t TickInterval::Milliseconds() const {
niklase@google.com470e71d2011-07-07 08:21:25 +0000317#if _WIN32
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000318#ifdef USE_QUERY_PERFORMANCE_COUNTER
319 LARGE_INTEGER qpfreq;
320 QueryPerformanceFrequency(&qpfreq);
321 return (interval_ * 1000) / qpfreq.QuadPart;
niklase@google.com470e71d2011-07-07 08:21:25 +0000322#else
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000323 // interval_ is in ms
324 return interval_;
325#endif
326#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
327 // interval_ is in ns
328 return interval_ / 1000000;
329#else
330 // interval_ is usecs
331 return interval_ / 1000;
niklase@google.com470e71d2011-07-07 08:21:25 +0000332#endif
333}
334
pbos@webrtc.org046deb92013-04-09 09:06:11 +0000335inline int64_t TickInterval::Microseconds() const {
niklase@google.com470e71d2011-07-07 08:21:25 +0000336#if _WIN32
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000337#ifdef USE_QUERY_PERFORMANCE_COUNTER
338 LARGE_INTEGER qpfreq;
339 QueryPerformanceFrequency(&qpfreq);
340 return (interval_ * 1000000) / qpfreq.QuadPart;
niklase@google.com470e71d2011-07-07 08:21:25 +0000341#else
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000342 // interval_ is in ms
343 return interval_ * 1000LL;
344#endif
345#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
346 // interval_ is in ns
347 return interval_ / 1000;
348#else
349 // interval_ is usecs
350 return interval_;
niklase@google.com470e71d2011-07-07 08:21:25 +0000351#endif
352}
353
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000354inline TickInterval& TickInterval::operator+=(const TickInterval& rhs) {
355 interval_ += rhs.interval_;
356 return *this;
niklase@google.com470e71d2011-07-07 08:21:25 +0000357}
358
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000359inline TickInterval& TickInterval::operator-=(const TickInterval& rhs) {
360 interval_ -= rhs.interval_;
361 return *this;
niklase@google.com470e71d2011-07-07 08:21:25 +0000362}
phoglund@webrtc.org4cebe6c2012-11-07 13:37:19 +0000363
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000364} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +0000365
phoglund@webrtc.org5c8d9d32013-01-03 09:50:17 +0000366#endif // WEBRTC_SYSTEM_WRAPPERS_INTERFACE_TICK_UTIL_H_