CountDown Timer (using Stopwatch)

JA-Translator

Moderator

CountDown Timer (using Stopwatch)​

https://www.macrodroidlink.com/macrostore?id=15844

Note: Recommend MD version 5.32 and more.

With the lower version, If you change the macro name, the Floating button gets broken and the macro doesn't work well.

Summary

This is a Countdown Timer to speak the remaining time.

It is (should be) a more accurate countdown timer based on the clock timer (Stopwatch).

You can set the timer by minute.

My previous simple countdown with Floating Text.
https://www.macrodroidlink.com/macrostore?id=15606


Usage Examples

- Instant Cup-Ramen noodles for 3 minutes,🍜
- Time practice for Exams,⏰
- 30-minute-workout training,💪
etc.


Initial setting

1. Set a start trigger by yourself, such as Widget button or Tile button.

2. Shell script is used to display "2-digit time clock".

For the device where the shell script doesn't work, please disable the Shell Script action and enable the "variable setting" in the next line instead.
Note that the remaining time will be displayed with a single digit.


Behavior

1. When the macro starts, Floating button (Stop button) is displayed on the screen.

2. Prompt to set the time duration and it will be saved in the variable "TotalMinutes".
The default value is 3 minutes.

3. Stopwatch "CountDownTimer" gets started.

4. The remaining time is displayed with the loop repeated approximately every 1 second.
The elapsed time on the StopWatch is subtracted from the Timer time which was set in the step 2 above.
The remaining time is displayed with Floating Text Action.
A pop-up display is also provided, but it is disabled now.

5. Read out the remaining time, every minute/every 10 seconds /every second.

Key Point

If you set the "Waiting time" Action inside the loop to "exactly 1 second", there may be a time delay to go with the operation process, and the counting display may be skipped sometimes.
(There is no problem in the time progress itself in the StopWatch.)

The key point is to set the waiting time to shorter than 1 second.
If your device has slow performance in the operation process, please set the further shorter wait-time.
 
Top