Changeset 349 in tmcsimulator for trunk/src/tmcsim/simulationmanager/SimulationManagerView.java
- Timestamp:
- 03/27/2019 03:01:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tmcsim/simulationmanager/SimulationManagerView.java
r47 r349 41 41 import tmcsim.common.CADEnums.PARAMICS_STATUS; 42 42 import tmcsim.common.CADEnums.SCRIPT_STATUS; 43 import tmcsim.common.TimeUtils; 43 44 import tmcsim.simulationmanager.actions.AddIncidentAction; 44 45 import tmcsim.simulationmanager.actions.ApplyDiversionAction; … … 329 330 currentSimulationTime = time; 330 331 331 String newTime = longToTime(currentSimulationTime);332 String newTime = TimeUtils.longToTime(currentSimulationTime); 332 333 333 334 simulationClockLabel.setText(newTime); … … 631 632 } 632 633 633 /**634 * Converts a the long representation of the time, to the H:MM:SS String format635 *636 * @param seconds number of seconds.637 * @return String H:MM:SS time representation.638 */639 public static String longToTime(long seconds) {640 String time = new String();641 long timeSegment;642 643 timeSegment = seconds / 3600;644 time += String.valueOf(timeSegment) + ":";645 646 seconds = seconds % 3600;647 648 timeSegment = seconds / 60;649 if(timeSegment < 10)650 time += "0";651 652 time += String.valueOf(timeSegment) + ":";653 seconds = seconds % 60;654 655 timeSegment = seconds;656 if(timeSegment < 10)657 time += "0";658 659 time += String.valueOf(timeSegment);660 661 return time;662 }663 664 634 /** 665 635 * This method is used to disply a message dialog with the received
Note: See TracChangeset
for help on using the changeset viewer.
