-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathTimer.h
More file actions
30 lines (24 loc) · 684 Bytes
/
Timer.h
File metadata and controls
30 lines (24 loc) · 684 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
#ifndef MY_TIMER_H
#define MY_TIMER_H
struct TimerImpl;
class Timer
{
public:
Timer();
Timer(const Timer& rhs);
~Timer();
const Timer& operator = (const Timer&);
/// Resets the timer
void Reset();
/// Returns elapsed time since constructor or last Reset() call, in milliseconds
long long ElapsedTicks();
/// Returns elapsed time since constructor or last Reset() call, in seconds
double ElapsedTime();
/// Returns elapsed time cached on prior ElapsedX call, in milliseconds
long long LastElapsedTicks() const;
/// Returns elapsed time cached on prior ElapsedX call, in seconds
double LastElapsedTime() const;
private:
TimerImpl* impl;
};
#endif