Changed race clock to display negative time before race
#story[16] #implement
This commit is contained in:
@@ -114,13 +114,17 @@ public abstract class Race implements Runnable {
|
||||
|
||||
while (currentTime <= startTime) {
|
||||
timeLeft = startTime - currentTime;
|
||||
if (timeLeft == 0 && controller != null) {
|
||||
updateTime("Race is starting...");
|
||||
} else {
|
||||
currentTimeInSeconds = timeLeft / 1000;
|
||||
minutes = currentTimeInSeconds / 60;
|
||||
remainingSeconds = currentTimeInSeconds % 60;
|
||||
hours = minutes / 60;
|
||||
minutes = minutes % 60;
|
||||
if (controller != null) {
|
||||
updateTime(String.format("Time until race starts: %02d:%02d:%02d", hours, minutes, remainingSeconds));
|
||||
updateTime(String.format("Time until race starts: -%02d:%02d:%02d", hours, minutes, remainingSeconds));
|
||||
}
|
||||
}
|
||||
try {
|
||||
timeLoopEnded = System.currentTimeMillis();
|
||||
|
||||
Reference in New Issue
Block a user