public abstract class Timeline extends java.lang.Object implements TimeLineInfo
Modifier and Type | Class and Description |
---|---|
static class |
Timeline.Type
In a time-based protocol, time passes within a round.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
hasDeadline |
protected boolean |
paused |
Constructor and Description |
---|
Timeline() |
Modifier and Type | Method and Description |
---|---|
abstract double |
getCurrentTime() |
abstract double |
getTime()
Gets the time, running from t = 0 (start) to t = 1 (deadline).
|
abstract double |
getTotalTime() |
Timeline.Type |
getType()
In a time-based protocol, time passes within a round.
|
boolean |
isDeadlineReached() |
boolean |
isPaused() |
void |
pause()
Method used to pause the timeline.
|
abstract void |
printTime()
Print the current time.
|
void |
resume()
Method used to resume the timeline.
|
public abstract double getTime()
getTime
in interface TimeLineInfo
public abstract double getTotalTime()
getTotalTime
in interface TimeLineInfo
public abstract double getCurrentTime()
getCurrentTime
in interface TimeLineInfo
public abstract void printTime()
public boolean isDeadlineReached()
public void pause() throws java.lang.Exception
java.lang.Exception
public void resume() throws java.lang.Exception
java.lang.Exception
public Timeline.Type getType()
TimeLineInfo
getType
in interface TimeLineInfo
public boolean isPaused()