| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // High resolution timer functions for use in Linux. | 5 // High resolution timer functions for use in Linux. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_SYNC_UTIL_HIGHRES_TIMER_LINUX_H_ | 7 #ifndef CHROME_BROWSER_SYNC_UTIL_HIGHRES_TIMER_LINUX_H_ |
| 8 #define CHROME_BROWSER_SYNC_UTIL_HIGHRES_TIMER_LINUX_H_ | 8 #define CHROME_BROWSER_SYNC_UTIL_HIGHRES_TIMER_LINUX_H_ |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 gettimeofday(&tv, 0); | 70 gettimeofday(&tv, 0); |
| 71 | 71 |
| 72 return tv.tv_sec * MICROS_IN_SECOND + tv.tv_usec; | 72 return tv.tv_sec * MICROS_IN_SECOND + tv.tv_usec; |
| 73 } | 73 } |
| 74 | 74 |
| 75 inline uint64 HighresTimer::GetElapsedTicks() const { | 75 inline uint64 HighresTimer::GetElapsedTicks() const { |
| 76 return start_ticks_ - GetCurrentTicks(); | 76 return start_ticks_ - GetCurrentTicks(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 #endif // CHROME_BROWSER_SYNC_UTIL_HIGHRES_TIMER_LINUX_H_ | 79 #endif // CHROME_BROWSER_SYNC_UTIL_HIGHRES_TIMER_LINUX_H_ |
| OLD | NEW |