summaryrefslogtreecommitdiff
path: root/platformio/relayctl/src/stopwatch.h
diff options
context:
space:
mode:
Diffstat (limited to 'platformio/relayctl/src/stopwatch.h')
-rw-r--r--platformio/relayctl/src/stopwatch.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/platformio/relayctl/src/stopwatch.h b/platformio/relayctl/src/stopwatch.h
deleted file mode 100644
index bac2fcc..0000000
--- a/platformio/relayctl/src/stopwatch.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#pragma once
-
-#include <Arduino.h>
-
-namespace homekit {
-
-class StopWatch {
-private:
- unsigned long time;
-
-public:
- StopWatch() : time(0) {};
-
- inline void save() {
- time = millis();
- }
-
- inline bool elapsed(unsigned long ms) {
- unsigned long now = millis();
- if (now < time) {
- // rollover?
- time = now;
- } else if (now - time >= ms) {
- return true;
- }
- return false;
- }
-};
-
-} \ No newline at end of file