I basically make a text βgameβ (not so much a game as a way to improve basic Java skills and logic). However, as part of this, I want to have a timer. It would count on the time I want from a variable to 0. Now I have seen several ways to do this with gui, however, is there a way to do this without gui / jframe, etc.
So, I'm curious. Can you make a count from x to 0 without using gui / jframe. If so, how would you do it?
Thank you when I get some ideas with progress.
Edit
// Start timer Runnable r = new TimerEg(gameLength); new Thread(r).start();
Above, as I call the thread / timer
public static void main(int count) {
If I have it in the TimerEg class, the timer matches. However, when compiling the main in another thread, I get.

Now, I completely missed the thread and how will it work? Or am I missing something?
Error:
constructor TimerEg in class TimerEg cannot be applied to given types; required: no arguments; found int; reason: actual and formal arguments differ in length
Found in line Runnable r = new TimerEg(gameLength);
source share