cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / gpu / command_buffer / common / time.h
blobe4eb9422e7b7ba302c6974e394b6932fecbb6d89
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.
5 #ifndef GPU_COMMAND_BUFFER_COMMON_TIME_H_
6 #define GPU_COMMAND_BUFFER_COMMON_TIME_H_
8 #if !defined(__native_client__)
10 #include "base/time/time.h"
12 namespace gpu {
14 inline uint64 MicrosecondsSinceOriginOfTime() {
15 return (base::TimeTicks::HighResNow() - base::TimeTicks()).InMicroseconds();
18 } // namespace gpu
20 #else
22 namespace gpu {
24 inline uint64 MicrosecondsSinceOriginOfTime() {
25 return 0;
28 } // namespace gpu
30 #endif // __native_client__
32 #endif // GPU_COMMAND_BUFFER_COMMON_TIME_H_