blob: 14e85910be77168882fdafcb767772ca5267290b [file] [log] [blame]
James Robinson646469d2014-10-03 15:33:28 -07001// Copyright 2013 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 UI_GFX_FRAME_TIME_H
6#define UI_GFX_FRAME_TIME_H
7
8#include "base/time/time.h"
9#include "base/logging.h"
10
11namespace gfx {
12
13// FrameTime::Now() should be used to get timestamps with a timebase that
14// is consistent across the graphics stack.
15class FrameTime {
16 public:
17 static base::TimeTicks Now() {
James Robinson646469d2014-10-03 15:33:28 -070018 return base::TimeTicks::Now();
19 }
20
James Robinson646469d2014-10-03 15:33:28 -070021 static bool TimestampsAreHighRes() {
22 // This should really return base::TimeTicks::IsHighResNowFastAndReliable();
23 // Returning false makes sure we are only using low-res timestamps until we
24 // use FrameTime everywhere we need to. See crbug.com/315334
25 return false;
26 }
27};
28
29}
30
31#endif // UI_GFX_FRAME_TIME_H