public abstract class Timeline
extends java.lang.Object
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() |
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()
public abstract double getTotalTime()
public abstract double getCurrentTime()
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()
public boolean isPaused()