org.mars_sim.msp.simulation.time
Class UpTimer

java.lang.Object
  extended by org.mars_sim.msp.simulation.time.UpTimer
All Implemented Interfaces:
java.io.Serializable

public class UpTimer
extends java.lang.Object
implements java.io.Serializable

The UpTimer class keeps track of how long an instance of the simulation has been running in real time.

See Also:
Serialized Form

Constructor Summary
UpTimer()
           
 
Method Summary
 void addTime(long period)
          This method adds a period of time to the running time of the simulation.
 java.lang.String getUptime()
          Determines the amount of time the simulation has been running.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpTimer

public UpTimer()
Method Detail

addTime

public void addTime(long period)
This method adds a period of time to the running time of the simulation.

Parameters:
period - Extra time the simulation is running. (milliseconds)

getUptime

public java.lang.String getUptime()
Determines the amount of time the simulation has been running.

Returns:
simulation running time formatted in a string. ex "5:32:58"