Hello, this is my first post so please be gentle and excuse my ignorance.
I am doing a timer application, very simple stuff I guess. But I am new learner, and I have a problem with the last method in the program.
what it does :
The timer must be able to keep track of time down to the nearest second. This timer does a decrement one second at a time until the timer value reaches 00:00:00. Once the timer reaches 00:00:00, it will stop counting down and print a message to the standard output
what I want it to do :
Once the initial timer value is set through the constructor or the setTimer() method. the method start() which will start the count down. This method will repeatedly call timeTick() to decrement the timer value by 1 second and then sleeps for 1 second. After each timer value decrement, the timer value needs to be printed to the standard output.
what I can't figure out
How can I tell the start() method to repeatdly call timeTick() every 1 second and print the results to the standard output and finally stop once it reaches 00:00:00 and print out "time is up" .. I've set up a decrement to go down every one second in the start method, but thats all I was able to do .. I tried to implement an if statement but I kept getting errors " if(getValue.seconds = 0, getValue.minutes = 0, getValue = 0) { System.print.out("time is up!"); } "
Any help would be SUPER, thanks
the timer class can be found here :
Nopaste - timer class
the number display class can be found here :
Nopaste - numberdisplay