Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / gpu / command_buffer / common / time.h
blobe58145b51f3134e7b96f91b02bc91cd83a21412b
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::Now() - 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_