| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef GPU_COMMAND_BUFFER_COMMON_TIME_H_ | 5 #ifndef GPU_COMMAND_BUFFER_COMMON_TIME_H_ |
| 6 #define GPU_COMMAND_BUFFER_COMMON_TIME_H_ | 6 #define GPU_COMMAND_BUFFER_COMMON_TIME_H_ |
| 7 | 7 |
| 8 #if !defined(__native_client__) | 8 #if !defined(__native_client__) |
| 9 | 9 |
| 10 #include "base/time.h" | 10 #include "base/time/time.h" |
| 11 | 11 |
| 12 namespace gpu { | 12 namespace gpu { |
| 13 | 13 |
| 14 inline uint64 MicrosecondsSinceOriginOfTime() { | 14 inline uint64 MicrosecondsSinceOriginOfTime() { |
| 15 return (base::TimeTicks::HighResNow() - base::TimeTicks()).InMicroseconds(); | 15 return (base::TimeTicks::HighResNow() - base::TimeTicks()).InMicroseconds(); |
| 16 } | 16 } |
| 17 | 17 |
| 18 } // namespace gpu | 18 } // namespace gpu |
| 19 | 19 |
| 20 #else | 20 #else |
| 21 | 21 |
| 22 namespace gpu { | 22 namespace gpu { |
| 23 | 23 |
| 24 inline uint64 MicrosecondsSinceOriginOfTime() { | 24 inline uint64 MicrosecondsSinceOriginOfTime() { |
| 25 return 0; | 25 return 0; |
| 26 } | 26 } |
| 27 | 27 |
| 28 } // namespace gpu | 28 } // namespace gpu |
| 29 | 29 |
| 30 #endif // __native_client__ | 30 #endif // __native_client__ |
| 31 | 31 |
| 32 #endif // GPU_COMMAND_BUFFER_COMMON_TIME_H_ | 32 #endif // GPU_COMMAND_BUFFER_COMMON_TIME_H_ |
| OLD | NEW |