epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | /* |
| 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 | */ |
mtklein | 9ac68ee | 2014-06-20 11:29:20 -0700 | [diff] [blame^] | 7 | #ifndef SysTimer_DEFINED |
| 8 | #define SysTimer_DEFINED |
bungeman@google.com | be9ad4e | 2011-06-07 19:16:02 +0000 | [diff] [blame] | 9 | |
bungeman@google.com | be9ad4e | 2011-06-07 19:16:02 +0000 | [diff] [blame] | 10 | #include <mach/mach.h> |
| 11 | #include <mach/mach_time.h> |
| 12 | |
mtklein | 9ac68ee | 2014-06-20 11:29:20 -0700 | [diff] [blame^] | 13 | class SysTimer { |
bungeman@google.com | be9ad4e | 2011-06-07 19:16:02 +0000 | [diff] [blame] | 14 | public: |
| 15 | void startWall(); |
| 16 | void startCpu(); |
| 17 | double endCpu(); |
| 18 | double endWall(); |
| 19 | private: |
| 20 | time_value_t fStartCpu; |
| 21 | uint64_t fStartWall; |
| 22 | }; |
| 23 | |
| 24 | #endif |