-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimer.h
More file actions
35 lines (29 loc) · 822 Bytes
/
timer.h
File metadata and controls
35 lines (29 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// ****************************************************************************
// By Antonino Perricone
// http://amicoperry.altervista.org/luce/
//
// This work is licensed under the Creative Commons
// Attribution-NonCommercial-ShareAlike 3.0 Unported License.
// To view a copy of this license, visit
// http://creativecommons.org/licenses/by-nc-sa/3.0/.
// ****************************************************************************
#pragma once
#ifdef WIN32 // Windows system specific
#include <windows.h>
#else // Unix based system specific
#include <sys/time.h>
#endif
class CTimer
{
public:
CTimer();
void Start();
double GetTime();
private:
#ifdef WIN32
LARGE_INTEGER frequency;
LARGE_INTEGER startValue;
#else
timeval startValue;
#endif
};