org.mars_sim.msp.core.time
Class UpTimer

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

public class UpTimer
extends Object
implements 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
 String getUptime()
          Reportsthe amount of time the simulation has been running, as a String.
 long getUptimeMillis()
           
 boolean isPaused()
           
 void setPaused(boolean isPaused)
           
 void updateTime()
           
 
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

updateTime

public void updateTime()

getUptime

public String getUptime()
Reportsthe amount of time the simulation has been running, as a String.

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

getUptimeMillis

public long getUptimeMillis()

isPaused

public boolean isPaused()

setPaused

public void setPaused(boolean isPaused)


Copyright © 2009-2013. All Rights Reserved.