|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.pogamut.experiments.TimeProvider
public class TimeProvider
TimeProvider has to be separate class, if it was part of the Experiment class it would cause problems with garbage collection. TimeProvider is alfo refecenced from Timer.
Field Summary | |
---|---|
protected boolean |
running
Is the timer running? |
protected long |
simulationTime
Time of simulation, paused when simulation is paused. |
protected long |
sysTimeOfLastEvent
Time when this timer was last resumed. |
protected long |
timeOfStart
Sys time when this experiment has started. |
Constructor Summary | |
---|---|
TimeProvider(Experiment experiment)
|
Method Summary | |
---|---|
long |
getSimulationTime()
|
long |
getSystemTime()
|
boolean |
isRunning()
|
void |
startTime()
|
void |
stopTime()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long simulationTime
protected long sysTimeOfLastEvent
protected boolean running
protected long timeOfStart
Constructor Detail |
---|
public TimeProvider(Experiment experiment)
experiment
- Experiment for which this object will provide time.Method Detail |
---|
public void stopTime()
public void startTime()
public long getSimulationTime()
public long getSystemTime()
public boolean isRunning()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |