blob: e1411d261a523e0f70191d0f601d2e8706d99be6 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
2/*
3 * Copyright 2011 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
bungeman@google.combe9ad4e2011-06-07 19:16:02 +00008#ifndef SkBenchTimer_DEFINED
9#define SkBenchTimer_DEFINED
10
11class BenchSysTimer;
12class BenchGpuTimer;
13
14/**
15 * SysTimers and GpuTimers are implemented orthogonally.
16 * This class combines a SysTimer and a GpuTimer into one single,
17 * platform specific, Timer with a simple interface.
18 */
19class BenchTimer {
20public:
21 BenchTimer();
22 ~BenchTimer();
23 void start();
24 void end();
25 double fCpu;
26 double fWall;
27 double fGpu;
28
29private:
30 BenchSysTimer *fSysTimer;
31 BenchGpuTimer *fGpuTimer;
32};
33
34#endif