Geoff Lang | 49be2ad | 2014-02-28 13:05:51 -0500 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved. |
| 3 | // Use of this source code is governed by a BSD-style license that can be |
| 4 | // found in the LICENSE file. |
| 5 | // |
| 6 | |
| 7 | #ifndef SAMPLE_UTIL_WIN32_TIMER_H |
| 8 | #define SAMPLE_UTIL_WIN32_TIMER_H |
| 9 | |
| 10 | #include "Timer.h" |
| 11 | #include <windows.h> |
| 12 | |
| 13 | class Win32Timer : public Timer |
| 14 | { |
| 15 | public: |
| 16 | Win32Timer(); |
| 17 | |
| 18 | void start(); |
| 19 | void stop(); |
| 20 | double getElapsedTime() const ; |
| 21 | |
| 22 | private: |
| 23 | bool mRunning; |
| 24 | LONGLONG mStartTime; |
| 25 | LONGLONG mStopTime; |
| 26 | |
| 27 | LONGLONG mFrequency; |
| 28 | }; |
| 29 | |
| 30 | #endif // SAMPLE_UTIL_WIN32_TIMER_H |