From a408a43cd105b89a8d44292e2ef69802a5660497 Mon Sep 17 00:00:00 2001 From: Stephen Enders Date: Sat, 23 Jan 2021 11:52:32 -0500 Subject: Move source files to src folder We'll be making a few source files it'll be useful to have them organized at least somewhat from our non-src files --- src/timedLatch.hpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/timedLatch.hpp (limited to 'src/timedLatch.hpp') diff --git a/src/timedLatch.hpp b/src/timedLatch.hpp new file mode 100644 index 0000000..77c7d49 --- /dev/null +++ b/src/timedLatch.hpp @@ -0,0 +1,22 @@ +#ifndef UR_TIMEDLATCH_H +#define UR_TIMEDLATCH_H +#include + +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 -- cgit v1.2.3-54-g00ecf