blob: 1eca909e269e168377054747467922ea6e5275d9 [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 <time.h>
11
mtklein9ac68ee2014-06-20 11:29:20 -070012class SysTimer {
bungeman@google.combe9ad4e2011-06-07 19:16:02 +000013public:
14 void startWall();
15 void startCpu();
16 double endCpu();
17 double endWall();
18private:
19 timespec fCpu;
20 timespec fWall;
21};
22
23#endif