//+
long t0 = System.currentTimeMillis();
while (true) {
long t1 = System.currentTimeMillis();
int seconds = (int) (t1-t0)/1000;
System.out.print("Elapsed: " + seconds + "\r");
try {
Thread.sleep(999);
} catch (InterruptedException e) {
// nothing to say
}
}
//-