# Countdown timer not working

**URL:** <https://community.glideapps.com/t/countdown-timer-not-working/25984>\
**Category:** Ask for Help\
**Created:** [April 24, 2021, 10:13am UTC](https://community.glideapps.com/t/countdown-timer-not-working/25984 "2021-04-24T10:13:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Annapurani\_Vaidyanat](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/annapurani_vaidyanat/32/21231_2.png) [@Annapurani\_Vaidyanat](https://community.glideapps.com/u/Annapurani_Vaidyanat)\
**Post date:** [April 24, 2021, 10:13am UTC](https://community.glideapps.com/t/countdown-timer-not-working/25984/1 "2021-04-24T10:13:09Z")

</div>

Mytimer doesn’t count down, nor does it take the duration into account.

I’m stuck!

Here’s what I have -

Start time - now()  
Duration - 0.15

I give these two values in the stopwatch elements, but the clock keeps going on even after 15 minutes.

Help please!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 24, 2021, 10:22am UTC](https://community.glideapps.com/t/countdown-timer-not-working/25984/2 "2021-04-24T10:22:04Z")

</div>

That’s how the [Stopwatch](https://docs.glideapps.com/all/reference/components/input/stopwatch) component works. Once you start it, it keeps going until you stop or pause it.

---

<div class="post-metadata">

**Author:** ![Mark\_Turrell](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark_turrell/32/26605_2.png) [@Mark\_Turrell](https://community.glideapps.com/u/Mark_Turrell)\
**Post date:** [April 24, 2021, 11:30am UTC](https://community.glideapps.com/t/countdown-timer-not-working/25984/3 "2021-04-24T11:30:17Z")

</div>

It is NOT a countdown clock 🙂 it is a stopwatch, something which keeps on adding time rather than counting down.

I built this rather nice thing (with the help of @Darren_Murphy) which is an actual countdown. And the nice colors are thanks to CSS wizardry from @Lucas_Pires.

 ![Screenshot 2021-04-23 at 18.41.38](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/2/22b5761acf488b101f174ccdd5809bd2af6c1c08.png) ![Screenshot 2021-04-23 at 18.42.38](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/1/41ef9e518c9128757f26d6ca5d69ea5abaee6030.png) ![Screenshot 2021-04-23 at 18.43.45](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/b/abc91510717d4c79fb48666c2a524bfe802867a2.png)

---

<div class="post-metadata">

**Author:** ![Annapurani\_Vaidyanat](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/annapurani_vaidyanat/32/21231_2.png) [@Annapurani\_Vaidyanat](https://community.glideapps.com/u/Annapurani_Vaidyanat)\
**Post date:** [April 24, 2021, 11:33am UTC](https://community.glideapps.com/t/countdown-timer-not-working/25984/4 "2021-04-24T11:33:11Z")

</div>

Hi, thanks for your screenshots. They look lovely.

But would it possible for you to help me with how to build the countdown timer? That’s where I’m stuck.

Yes, I understand it’s a stopwatch but I’m looking for a workaround to make it countdown

---

<div class="post-metadata">

**Author:** ![Mark\_Turrell](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark_turrell/32/26605_2.png) [@Mark\_Turrell](https://community.glideapps.com/u/Mark_Turrell)\
**Post date:** [April 24, 2021, 12:48pm UTC](https://community.glideapps.com/t/countdown-timer-not-working/25984/5 "2021-04-24T12:48:42Z")

</div>

You have ‘Now’ - the time of now - this is part of Glide to do math  
You have your start time - in my case ‘Photo’ - the time the user took the photo  
You have your ‘wait time’ — in my case ‘min’ 15 mins as the min time to wait

First column is:

- countdown end = photo + min (BUT you need to adjust the math as Glide is based on 24 hour days)  
—\> this gives you how many minutes in the future your end point is

Second column is:

- the time left = countdown end - now (adjusted for minutes)

And in the UX

- set the max value to your max time (in my case ‘min’)
- set the column (the data being shown) to your countdown
- and have a 0 value

 ![Screenshot 2021-04-24 at 14.39.58](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/0/c075cc7efa778bee7998111a144ea4db23ab4a38.png) ![Screenshot 2021-04-24 at 14.39.46](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/0/1071660032a13ee1adc26d1430bbb7a9749e5550.png)  
 ![Screenshot 2021-04-24 at 14.45.44](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/f/3f72159ba4587321fe8a5f81f2af616b24462569.png)  
And I have some bonus CSS too:

```
[class="circle-progress-container"] \>\* \>\* :nth-of-type(1) { stroke: green; } --- this allows me to adjust the color of the progress bar - and I have a visibility setting --\> if countdown is less than X, show this color, otherwise show another color I hope this makes sense - good luck!
```

---

<div class="post-metadata">

**Author:** ![Annapurani\_Vaidyanat](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/annapurani_vaidyanat/32/21231_2.png) [@Annapurani\_Vaidyanat](https://community.glideapps.com/u/Annapurani_Vaidyanat)\
**Post date:** [April 24, 2021, 1:02pm UTC](https://community.glideapps.com/t/countdown-timer-not-working/25984/6 "2021-04-24T13:02:01Z")

</div>

Yes it does, thanks! I’ll try it out and get back to you
