@@ -34,13 +34,16 @@ For longer periods one could cascade CountDown objects, so when one is finished
3434Note the CountDown object is as accurate as the underlying ** millis()** or ** micros()** .
3535Interrupts etc. might cause deviations.
3636
37+ Feedback as always is welcome.
38+
3739
3840### Related
3941
42+ - https://github.com/RobTillaart/CountDown
43+ - https://github.com/RobTillaart/dateTimeHelpers formatting date / time strings
4044- https://github.com/RobTillaart/printHelpers
4145- https://github.com/RobTillaart/stopWatch_RT
42- - https://github.com/RobTillaart/CountDown
43- - https://github.com/RobTillaart/timing wrappers around millis() and microc()
46+ - https://github.com/RobTillaart/timing wrappers around millis() and micros()
4447
4548
4649## Interface
@@ -59,6 +62,7 @@ default to MILLIS. See table below.
5962- ** enum Resolution resolution()** return the current resolution (integer).
6063- ** char getUnits()** return the current resolution as printable char (u,m,s,M)
6164
65+
6266### Start / Stop functions
6367
6468- ** bool start(uint32_t ticks)** (re)start in current resolution.
@@ -78,12 +82,14 @@ Obsolete in future (0.4.0).
7882- ** void cont()** resumes / continue the count down.
7983* (note continue is a C-Keyword)*
8084
85+
8186### Status
8287
8388- ** uint32_t remaining()** returns the remaining ticks in current resolution.
8489- ** bool isRunning()** idem.
8590- ** bool isStopped()** idem.
8691
92+
8793## Operation
8894
8995The function ** start(days, hours, minutes, seconds)** allows all combinations
@@ -118,6 +124,7 @@ The resolution is implicitly set to **CountDown::MINUTES**.
118124| start(ticks) | MICROS = micros | ~ 70 min | setResolution(CountDown::MICROS) |
119125| start(ticks) | SECONDS = millis | 49+ days | setResolution(CountDown::SECONDS) |
120126| start(ticks) | MINUTES = millis | 49+ days | setResolution(CountDown::MINUTES) |
127+ | start(ticks) | HOURS = millis | 49+ days | setResolution(CountDown::HOURS) |
121128
122129
123130The Countdown clock uses by default ** millis()** to do the time keeping,
@@ -131,6 +138,7 @@ The parameter **res** can be:
131138| CountDown::MILLIS | millis() | m | default
132139| CountDown::SECONDS | millis() | s |
133140| CountDown::MINUTES | millis() | M |
141+ | CountDown::HOURS | millis() | H |
134142
135143Although possible one should not change the resolution of the CountDown
136144clock while it is running as you mix up different timescales.
@@ -173,10 +181,12 @@ a repeating (timed) function or a watchdog. See examples.
173181- add examples
174182 - visualisations - hexadecimal - alphabetical (radix 26)
175183 - depends on sensor
176- - add resolution::HOURS + ** start(days, hours)**
177- - extend adaptive display example
178- - or default 00 minutes?
179- - add ** void resume()** instead of ** cont()** ?
184+ - implement a CountDown64 class
185+ - far longer timespan
186+ - inaccurate at best
187+ - interesting for longer micros() time span?
188+ - implement a CountDownRTC class
189+ - which RTC?
180190
181191#### Wont (unless)
182192
@@ -196,6 +206,7 @@ a repeating (timed) function or a watchdog. See examples.
196206- printable interface (stopwatch_rt)
197207- add call-back function when ** 0** is reached
198208 - cannot be guaranteed as interface polls.
209+ - enum State { RUNNING, PAUSED, STOPPED }; // stopped => remaining = 0;
199210
200211
201212## Support
0 commit comments