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 // WindowsTimer.h: Definition of a high precision timer class on Windows 8 9 #ifndef UTIL_WINDOWS_TIMER_H 10 #define UTIL_WINDOWS_TIMER_H 11 12 #include <windows.h> 13 14 #include "Timer.h" 15 16 class WindowsTimer : public Timer 17 { 18 public: 19 WindowsTimer(); 20 21 void start() override; 22 void stop() override; 23 double getElapsedTime() const override; 24 25 private: 26 bool mRunning; 27 LONGLONG mStartTime; 28 LONGLONG mStopTime; 29 30 LONGLONG mFrequency; 31 }; 32 33 #endif // UTIL_WINDOWS_TIMER_H 34