Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8364445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:25:57+00:00 2026-06-09T12:25:57+00:00

In my Application, I need the Countdown timer(like a chronometer in Android) which is

  • 0

In my Application, I need the Countdown timer(like a chronometer in Android) which is implemented on Canvas and display the countdown time to the user.
How can I implement Countdown Timer on Canvas and display the Countdown time to the user?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T12:25:58+00:00Added an answer on June 9, 2026 at 12:25 pm

    Its very easy, you simply need to use two classes TimerTask and Timer class. The TimerTask class is a thread which will execute your particular code while Timer is the class which tells TimerTask when to perform the code defined init. Just study the following code,

    import java.util.Timer;
    import java.util.TimerTask;
    
    public class TimerDemo
    {
        private MyTimerTask mt;
        private Timer timer;
    
        public TimerDemo()
        {
            mt = new MyTimerTask();     
            timer = new Timer(); 
            timer.schedule(mt, 1000, 1000);
            System.out.println ( "Countdown Begins " ); 
        }
    
        public static void main ( String args[] )
        {
            TimerDemo td = new TimerDemo();
        }
    
        private class MyTimerTask extends TimerTask
        {
            int val = 10;
            public void run()
            {
                if ( val > 0 )
                {
                    System.out.println ( "Value : " + val-- );
                }
                else
                {
                    timer.cancel();
                }
            }
        }
    }
    
    /*************************/
    /**********OUTPUT*********
    Countdown Begins 
    Value : 10
    Value : 9
    Value : 8
    Value : 7
    Value : 6
    Value : 5
    Value : 4
    Value : 3
    Value : 2
    Value : 1
    *************************/
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application I need to know the user's Facebook uid. I get by
I need to make an application which has two windows: Window 1 Contains 6
My android application need to print over wifi printer.Here wifi printer will be connected
I have a rails application and i need to get the Eastern standard Time
My .Net application need to communicate with Linux based system which is using following
I plan to create an application on android which use openfire(XMPP) and also use
We need to build the following application:- User punches in couple of inputs into
I need to develop an iPad application which should manage the two orientation mode
In my application I need to load large files (can be about ~ 250
I have an MVC application that I need to countdown a certain number of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.