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 <stdint.h> |
| 11 |
10 #include "base/time/time.h" | 12 #include "base/time/time.h" |
11 | 13 |
12 namespace gpu { | 14 namespace gpu { |
13 | 15 |
14 inline uint64 MicrosecondsSinceOriginOfTime() { | 16 inline uint64_t MicrosecondsSinceOriginOfTime() { |
15 return (base::TimeTicks::Now() - base::TimeTicks()).InMicroseconds(); | 17 return (base::TimeTicks::Now() - base::TimeTicks()).InMicroseconds(); |
16 } | 18 } |
17 | 19 |
18 } // namespace gpu | 20 } // namespace gpu |
19 | 21 |
20 #else | 22 #else |
21 | 23 |
22 namespace gpu { | 24 namespace gpu { |
23 | 25 |
24 inline uint64 MicrosecondsSinceOriginOfTime() { | 26 inline uint64_t MicrosecondsSinceOriginOfTime() { |
25 return 0; | 27 return 0; |
26 } | 28 } |
27 | 29 |
28 } // namespace gpu | 30 } // namespace gpu |
29 | 31 |
30 #endif // __native_client__ | 32 #endif // __native_client__ |
31 | 33 |
32 #endif // GPU_COMMAND_BUFFER_COMMON_TIME_H_ | 34 #endif // GPU_COMMAND_BUFFER_COMMON_TIME_H_ |
OLD | NEW |