summaryrefslogtreecommitdiff
path: root/timedLatch.hpp
blob: 77c7d498123f65f3d24d80b833792b7ba4a1fc07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef UR_TIMEDLATCH_H
#define UR_TIMEDLATCH_H
#include <SFML/System.hpp>

namespace ur {
class TimedLatch
{
public:
  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