|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcore.SimClock
public class SimClock
Wall clock for checking the simulation time.
Method Summary | |
---|---|
void |
advance(double time)
Advances the time by n seconds |
static SimClock |
getInstance()
Get the instance of the class that can also change the time. |
static int |
getIntTime()
Returns the current time rounded to the nearest integer |
static double |
getTime()
Returns the current time (seconds since start) |
static void |
reset()
Resets the static fields of the class |
void |
setTime(double time)
Sets the time of the clock. |
java.lang.String |
toString()
Returns the current simulation time in a string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static SimClock getInstance()
public static double getTime()
public static int getIntTime()
public void advance(double time)
time
- Nrof seconds to increase the timepublic void setTime(double time)
time
- the time to setpublic java.lang.String toString()
toString
in class java.lang.Object
public static void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |