RaceLogic no longer uses AnimationTimer for its main loop (since that ran in javafx thread).

This commit is contained in:
fjc40
2017-08-15 14:37:36 +12:00
parent 175fb11178
commit c9875f3987
2 changed files with 24 additions and 38 deletions
@@ -174,7 +174,7 @@ public class VisualiserBoat extends Boat {
*/
public String getTimeToNextMarkFormatted(ZonedDateTime currentTime) {
if (getTimeAtLastMark() != null) {
if ((getTimeAtLastMark() != null) && (currentTime != null)) {
//Calculate time delta.
Duration timeUntil = Duration.between(currentTime, getEstimatedTimeAtNextMark());
@@ -213,7 +213,7 @@ public class VisualiserBoat extends Boat {
*/
public String getTimeSinceLastMarkFormatted(ZonedDateTime currentTime) {
if (getTimeAtLastMark() != null) {
if ((getTimeAtLastMark() != null) && (currentTime != null)) {
//Calculate time delta.
Duration timeSince = Duration.between(getTimeAtLastMark(), currentTime);