Questions tagged [countdown]

This tag refers to the process of counting down. In other words, the act of taking an initial value and then consistently subtracting a smaller value from it until the original value reaches a specified amount (usually 0).

Use this tag for questions that deal with counting down or countdown timers (a device that performs the countdown).

2279 questions
316
votes
3 answers

How to write a countdown timer in JavaScript?

Just wanted to ask how to create the simplest possible countdown timer. There'll be a sentence on the site saying: "Registration closes in 05:00 minutes!" So, what I want to do is to create a simple js countdown timer that goes from "05:00" to…
Bartek
  • 3,203
  • 3
  • 12
  • 5
224
votes
16 answers

How to make a countdown timer in Android?

I have two EditTexts in XML. In one EditText, the user can put a number as minutes and in another EditText, a number as seconds. After clicking the finish button, the seconds EditText should start to countdown and update its text every second.…
Sabbir Ahmed
  • 2,297
  • 2
  • 15
  • 13
210
votes
13 answers

How is CountDownLatch used in Java Multithreading?

Can someone help me to understand what Java CountDownLatch is and when to use it? I don't have a very clear idea of how this program works. As I understand all three threads start at once and each Thread will call CountDownLatch after 3000ms. So…
amal
  • 3,470
  • 10
  • 29
  • 43
131
votes
14 answers

Flutter Countdown Timer

How can I do to put the value passed in the construction, to make a timer that rounds to the first decimal and shows at the child text of my RaisedButton? I've tried but without luck. I manage to make work the callback function with a simple Timer…
Floris Marpepa
  • 1,891
  • 4
  • 12
  • 22
90
votes
20 answers

Countdown timer in React

I have seen lots of countdown timers in JavaScript and wanted to get one working in React. I have borrowed this function I found online: secondsToTime(secs){ let hours = Math.floor(secs / (60 * 60)); let divisor_for_minutes = secs % (60 *…
The worm
  • 5,580
  • 14
  • 36
  • 49
63
votes
10 answers

Countdown timer using Moment js

I am making a countdown timer for an event page, i used moment js for this. Here is fiddle for this. I am calculating date difference between event date and current date (timestamp), then using "duration" method from moment js. But the time left is…
Arpit Rawat
  • 1,817
  • 2
  • 20
  • 28
52
votes
12 answers

Android: CountDownTimer skips last onTick()!

Code: public class SMH extends Activity { public void onCreate(Bundle b) { super.onCreate(b); setContentView(R.layout.main); TextView tv = (TextView) findViewById(R.id.tv); new CountDownTimer(10000,…
50
votes
10 answers

angularjs make a simple countdown

I would like make a countDown with Angular js. this is my code: Html File
{{countDown}}…
user1613464
43
votes
3 answers

Android ProgressBar countdown

I'm making a quiz for Android and I want a limited time to answer every question. So I want to display a ProgressBar under the answers that counts down from, for example, 5 to 0 (seconds). And when it reaches zero I want to do some stuff. I have the…
simtaxman
  • 613
  • 2
  • 11
  • 18
38
votes
4 answers

Countdown Timer Image GIF in Email

I recently received an emailer from Onnit Labs that included a Countdown Module Timer inside the emailer using a gif image. The emailer can be viewed here: https://www.onnit.com/emails/lastchance-historic/ The Image can be seen here: I looked into…
alvaram
  • 405
  • 1
  • 5
  • 7
26
votes
3 answers

How to make a countdown timer in Java

I'm a beginner (student) in programming and was assigned to create a game. The game I'm making is called boggle. In which the player have to find words in a random letter board within a given time, but I'm having trouble with creating the…
Vamala
  • 301
  • 1
  • 3
  • 3
18
votes
4 answers

How to handle multiple countdown timers in ListView?

I have a listview (with a custom list adapter), I need to display a countdown on every row. For example, if my list contains 4 items, I will have 4 rows. At this point, I need to handle 4 different countdowns (one for each row) because time is…
Rob
  • 748
  • 2
  • 7
  • 16
18
votes
4 answers

How to programmatically set a lock or pin for an app

So right now I am trying to develop an Android App for my young children. I want to set a pin or passwords on selected applications for a particular amount of time to prevent them from opening the app. For example, let's say that my daughter wants…
18
votes
2 answers

How to make a wpf countdown timer?

I want to create wpf countdown timer that display the result as hh:mm:ss into textbox, I would be thankful for anyone help.
user2419978
  • 367
  • 1
  • 3
  • 9
16
votes
5 answers

How to set one minute counter in javascript?

In my project ,I have list of questions, for every question have three option answers. After see the question if i want answer that question means click "show answer" button . when I click button ,counter starts for one minute after one minute…
Karthick Terror
  • 801
  • 2
  • 8
  • 11
1
2 3
99 100