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 | |
| 10 | //Time |
| 11 | #define WIN32_LEAN_AND_MEAN 1 |
bungeman@google.com | 0d9e3da | 2013-12-03 15:23:37 +0000 | [diff] [blame] | 12 | #include <windows.h> |
bungeman@google.com | be9ad4e | 2011-06-07 19:16:02 +0000 | [diff] [blame] | 13 | |
mtklein | 9ac68ee | 2014-06-20 11:29:20 -0700 | [diff] [blame^] | 14 | class SysTimer { |
bungeman@google.com | be9ad4e | 2011-06-07 19:16:02 +0000 | [diff] [blame] | 15 | public: |
| 16 | void startWall(); |
| 17 | void startCpu(); |
| 18 | double endCpu(); |
| 19 | double endWall(); |
| 20 | private: |
| 21 | ULONGLONG fStartCpu; |
| 22 | LARGE_INTEGER fStartWall; |
| 23 | }; |
| 24 | |
| 25 | #endif |