• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #ifndef GPU_COMMAND_BUFFER_COMMON_TIME_H_
6 #define GPU_COMMAND_BUFFER_COMMON_TIME_H_
7 
8 #if !defined(__native_client__)
9 
10 #include "base/time/time.h"
11 
12 namespace gpu {
13 
MicrosecondsSinceOriginOfTime()14 inline uint64 MicrosecondsSinceOriginOfTime() {
15   return (base::TimeTicks::HighResNow() - base::TimeTicks()).InMicroseconds();
16 }
17 
18 } // namespace gpu
19 
20 #else
21 
22 namespace gpu {
23 
MicrosecondsSinceOriginOfTime()24 inline uint64 MicrosecondsSinceOriginOfTime() {
25   return 0;
26 }
27 
28 } // namespace gpu
29 
30 #endif  // __native_client__
31 
32 #endif  // GPU_COMMAND_BUFFER_COMMON_TIME_H_
33