blob: 8c21d57b36723106f8e4750fa8f8f167b4ee33a7 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001/*
2 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
mtklein9ac68ee2014-06-20 11:29:20 -07007#ifndef SysTimer_DEFINED
8#define SysTimer_DEFINED
bungeman@google.combe9ad4e2011-06-07 19:16:02 +00009
bungeman@google.combe9ad4e2011-06-07 19:16:02 +000010#include <mach/mach.h>
11#include <mach/mach_time.h>
12
mtklein9ac68ee2014-06-20 11:29:20 -070013class SysTimer {
bungeman@google.combe9ad4e2011-06-07 19:16:02 +000014public:
15 void startWall();
16 void startCpu();
17 double endCpu();
18 double endWall();
19private:
20 time_value_t fStartCpu;
21 uint64_t fStartWall;
22};
23
24#endif