OSDN Git Service

DirectX11 SDK のTutorial07をほとんど真似て立方体を回してみた。
[shooting3/dxgi_test.git] / dxgi_test / timer.h
1 /*
2   ==============================================================================
3
4    This file is part of the mini timer
5    Copyright 2005-11 by Satoshi Fujiwara.
6
7    mini timer can be redistributed and/or modified under the terms of the
8    GNU General Public License, as published by the Free Software Foundation;
9    either version 2 of the License, or (at your option) any later version.
10
11    mini timer is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with mini timer; if not, visit www.gnu.org/licenses or write to the
18    Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
19    Boston, MA 02111-1307 USA
20
21   ==============================================================================
22 */
23 #pragma once
24 #include "base_window.h"
25 namespace sf{
26 struct timer
27 {
28   struct exception
29     : public sf::win32_error_exception 
30   {
31     exception(uint32_t hr) : win32_error_exception(hr) {};
32     exception() : win32_error_exception() {} ;
33   };
34
35   timer(sf::base_window& window,uint32_t timeout);
36   void start();
37   void stop();
38   ~timer(){stop();};
39 private:
40   sf::base_window& window_;
41   uint32_t timer_id_;
42   uint32_t timeout_;
43 };
44 }
45