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
6
votes
2 answers

How to display a countdown on a single line in the console?

I need a countdown timer in python but without skipping line. from time import sleep for c in range (4,0,-1): print(c) sleep(1) this code makes the countdown by jumping the lines ex: print('3') print('2') print('1') I need that in the same…
Sóstenes Melo
  • 217
  • 1
  • 3
  • 12
6
votes
3 answers

How to make a countdown timer in asp.net web application(C#)?

I am creating timed online test in C# asp.net. I have created it using the local machine time. But in the case of Database disconnection or system hang, The countdown timer must start from the time at which the machine has hanged or unexpected…
Prem
  • 5,685
  • 15
  • 52
  • 95
6
votes
1 answer

Game fails to check condition and starts in the background

Functionality: User will navigate from the "Instruction" Page (1st Page) to the "Game" Page (2nd Page) and play the game designed. "Instruction" Page has a list of instructions for users and a start button that when clicked will navigate users to…
Luke
  • 982
  • 1
  • 7
  • 27
6
votes
4 answers

Continue countdown timer when app is running in background/suspended

I have a functional countdown timer. The problem is that I need to continue the countdown when the user puts the app in the background. Or suspends the app? I am not sure what the correct terminology is to describe this action. In other words, the…
Michael Ninh
  • 772
  • 2
  • 10
  • 23
6
votes
6 answers

Make countdown start after button is clicked

I'm creating a kid's game with a timer countdown that starts after the user clicks a button. The code I'm using initiates the countdown without a problem, but I'd like the countdown to start only after the button is clicked. Here is my…
Lauren
  • 177
  • 1
  • 2
  • 11
6
votes
3 answers

Java - Countdown timer without GUI

Basically I am making a text based "game" (Not so much a game, more of a way to improve basic java skills and logic). However, as part of it I wish to have a timer. It would count down on the time I wish from the variable to 0. Now, I have seen a…
Kyle93
  • 795
  • 5
  • 16
  • 26
5
votes
2 answers

How do I stop a timer that hasn't finished and then start a new one?

I'm attempting to do a guessing game, of sorts. The issue is my timer bleeds into the next one after a question is answered (button pressed) and a new timer starts. This leads to two timers changing a textview at different intervals, which is not…
MattDementous
  • 97
  • 3
  • 7
5
votes
3 answers

receive local notifications within own app / view (or how to register a UNUserNotificationCenterDelegate in SwiftUI )

I am redeveloping an android app for iOS with SwiftUI that contains a countdown feature. When the countdown finishes the user should be noticed about the end of the countdown. The Notification should be somewhat intrusive and work in different…
Patrick Michiels
  • 239
  • 4
  • 13
5
votes
1 answer

setInterval inside .each() only working for last interval?

Goal: Im looping through several .event elements using jQuery's each function. I am calculating a timer countdown using information coming from hidden span elements inside each .event class. I am using setInterval() to recalculate the remaining time…
Sandro
  • 63
  • 1
  • 5
5
votes
5 answers

Removing days and hours from a countdown timer

I'm using a countdown timer from this jQuery file but I want to remove the days and hours from it so it only shows minutes and seconds. Can anyone help me out? The digits are displayed from a png file which creates a flip board effect as it displays…
Gezzamondo
  • 1,519
  • 4
  • 14
  • 26
5
votes
4 answers

How make react countdown timer

i'm trying to do countdown timer with react. It will be basically countdown from 10 to 0 and when 0 i will call some function. i found ideally for me some example: https://codesandbox.io/s/0q453m77nw?from-embed but it's a class component i wan't…
user3348410
  • 2,733
  • 10
  • 51
  • 85
5
votes
1 answer

Javascript Countdown Timer

I need a count down timer that can display second:miliseconds format, I found one that I figured I could modify it to show this like 4:92 but it doesn't want to work for me for some reason. It works fine on the site, but I try and put it into my…
Sean
  • 8,401
  • 15
  • 40
  • 48
5
votes
2 answers

How to Sync countdown timer with Server from Android Application

A Countdown Timer is started from Node.js Server, and when starting a countdown timer a socket event(with countdown ~20s) is broadcasted to all connected clients(Android App) using Socket.IO. And sometimes due to slow internet connection or due to…
Valamburi M
  • 692
  • 4
  • 17
5
votes
2 answers

timer is not reset when "game" restarts

Functionality: User to play a time-based game in game page. There will be a countdown timer that will keep track of the game duration, hence, when the counter =0, it will do a check and assess if the user has satisfy the game condition. The Game…
Luke
  • 982
  • 1
  • 7
  • 27
5
votes
1 answer

Why isnt my AngularJS cancel interval working

I would like to stop the countdown when the stop timer is pressed. Im not sure why this is not working. I have a simple jsfiddle set up here. CODE View

Time Remaining:…

Daniel Kobe
  • 9,376
  • 15
  • 62
  • 109