blob: 30e3f4320f2c0cf44b35d68f50073fb0efc81f2f (
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
|
#ifndef UR_TIMEDLATCH_H
#define UR_TIMEDLATCH_H
#include <SFML/System.hpp>
namespace ur {
class TimedLatch
{
public:
explicit TimedLatch(sf::Time duration);
void start();
void reset();
bool is_running();
bool is_completed();
private:
bool isStarted;
sf::Time duration;
sf::Clock clock; // internal sfml clock to manage time
};
}
#endif
|