blob: e580f6c0f9df2ed3e2440e9b4f347a9a3f08bee0 (
plain)
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
|
#ifndef TIME_H
#define TIME_H
#include <SFML/System/Clock.hpp>
class Clock {
private:
sf::Clock clock;
bool running;
float base;
public:
Clock();
void reset();
void start();
void stop();
float elapsed() const;
};
class Timer {
private:
const Clock& clock;
float starttime;
public:
Timer(const Clock& clock_);
void reset();
float elapsed() const;
};
#endif
|