mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Fixed estimate time to next mark to match acceptance criteria which is countdown in minutes and seconds.
#story[924]
This commit is contained in:
@@ -39,6 +39,7 @@ public class StreamParser extends Thread{
|
||||
private static Map<Integer, Yacht> boats = new HashMap<>();
|
||||
private static Map<Long, Yacht> boatsPos = new TreeMap<>();
|
||||
private static double windDirection = 0;
|
||||
private static Long currentTimeLong;
|
||||
private static String currentTimeString;
|
||||
private static boolean appRunning;
|
||||
|
||||
@@ -199,6 +200,7 @@ public class StreamParser extends Thread{
|
||||
// System.out.println("raceStatus = " + raceStatus);
|
||||
long expectedStartTime = bytesToLong(Arrays.copyOfRange(payload,12,18));
|
||||
|
||||
currentTimeLong = currentTime;
|
||||
DateFormat format = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
|
||||
if (xmlObject.getRegattaXML() != null) {
|
||||
format.setTimeZone(TimeZone.getTimeZone(getTimeZoneString()));
|
||||
@@ -575,6 +577,15 @@ public class StreamParser extends Thread{
|
||||
return boatsPos;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns current time in stream in long
|
||||
*
|
||||
* @return a long value of current time
|
||||
*/
|
||||
public static Long getCurrentTimeLong() {
|
||||
return currentTimeLong;
|
||||
}
|
||||
|
||||
public static void appClose(){
|
||||
appRunning = false;
|
||||
System.out.println("[CLIENT] Shutting down stream parser");
|
||||
|
||||
Reference in New Issue
Block a user