Wednesday 5 December 2012

CountDown Timer


         CountDown Timer is an application for set the time and start the counting down in seconds,minutes,hours etc.The language used for develop the countdown timer is javascript in html canvas.The main idea for contdown timer is refreshing the canvas on every call of setInterval( ) which is set for 1000ms.

      There is two text box for enter the time in minutes and seconds.Three buttons are available for start,stop and set.The start button is used for start counting down, the stop button is used for stop the timer and the set button is used for set the initial time.

There are four functions are mainly used for develop the timer.


function counter()

      This function is used for counting down in second and minutes based on some conditions which depend the initial value.This function return the message "Time out" when seconds ==00 and minutes ==00.

function start()

      This function is used for start the timer.within this function call of setInterval( ) which is set for 1000ms.

function set()

            This function is used for set the inital time in seconds and minutes.

function stop()

            This function is used for stop the timer.Within this function call clearInterval() .


Click here for download the code for CountDown Timer in javascript.


COUNTDOWN TIMER








COUNT DOWN TIMER
minutes: seconds:

No comments:

Post a Comment