public final class RealTimePlatform extends Platform
Typical use of this platform is shown below:
import org.arl.fjage.*;
Platform platform = new RealTimePlatform();
Container container = new Container(platform);
container.add("myAgent", new myAgent()); // add appropriate agents
platform.start();
containers, running| Constructor and Description |
|---|
RealTimePlatform() |
| Modifier and Type | Method and Description |
|---|---|
long |
currentTimeMillis()
Gets the current platform time in milliseconds.
|
void |
delay(long millis)
Delays execution by a specified number of milliseconds of platform time.
|
void |
idle()
Internal method called by a container when all agents are idle.
|
long |
nanoTime()
Gets the current platform time in nanoseconds.
|
void |
schedule(java.util.TimerTask task,
long millis)
Schedules a task to be executed after a given delay.
|
addContainer, getBuildVersion, getContainers, getHostname, getNetworkInterface, isIdle, isRunning, setHostname, setNetworkInterface, setNetworkInterface, shutdown, startpublic long currentTimeMillis()
PlatformcurrentTimeMillis in interface TimestampProvidercurrentTimeMillis in class Platformpublic long nanoTime()
PlatformnanoTime in interface TimestampProvidernanoTime in class Platformpublic void schedule(java.util.TimerTask task,
long millis)
Platformpublic void idle()
Platformpublic void delay(long millis)
Platform
This method should not be called by an agent directly, as it may deadlock.
An agent should use Agent.delay(long) instead.