Changeset 152 in tmcsimulator for trunk/src/tmcsim/client/ATMSBatchDriver.java


Ignore:
Timestamp:
10/20/2017 09:18:44 AM (9 years ago)
Author:
jdalbey
Message:

Coordinator.java: new method getATMStime added for use by ATMSBatchDriver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/client/ATMSBatchDriver.java

    r140 r152  
    3232import javax.swing.Timer; 
    3333import javax.swing.UIManager; 
     34import tmcsim.cadsimulator.CADServer; 
    3435import tmcsim.common.SimulationException; 
    3536import tmcsim.interfaces.CADClientInterface; 
     
    158159        theView = new ATMSBatchViewer(this, new ArrayList<String>(incidents.keySet())); 
    159160        theView.setVisible(true); 
    160         theView.update("0:00", eventQueue); 
     161        theView.update("0:00", "1:11", eventQueue); 
    161162 
    162163        // Create a timer that fetches the simulation time every second. 
     
    167168            { 
    168169                String currentClock = ""; 
     170                String currentATMStime = ""; 
    169171                Date simClock = new Date();                 
    170172                // Obtain the simulation time from the CAD server 
     
    173175                    long simtime = theCoorInt.getCurrentSimulationTime(); 
    174176                    currentClock = formatInterval(simtime); 
     177                    long ATMStime = theCoorInt.getATMStime();        
     178                    Date atmsdate = new Date(ATMStime); 
     179                    currentATMStime = formatter.format(atmsdate); 
    175180                    try { 
    176181                        simClock = formatter.parse(currentClock); 
     
    231236                        } 
    232237                    } 
    233                     theView.update(currentClock, eventQueue); 
     238                     
     239                    theView.update(currentClock, currentATMStime, eventQueue); 
    234240                } 
    235241            } 
     
    322328        } 
    323329        // Now refresh the view with the updated queue of events 
    324         theView.update("0:00", eventQueue); 
     330        theView.update("0:00", "0:00", eventQueue); 
    325331    } 
    326332     
Note: See TracChangeset for help on using the changeset viewer.