| org.cougaar.planning.plugin.legacy.SimplePlugin org.cougaar.mlm.examples.ClockTest
ClockTest | public class ClockTest extends SimplePlugin (Code) | | this plugin is a point-test for (demo-time) clock advance functionality.
It can do two things:
1. when it is passed an argument, it is a clock setter, advancing the
COUGAAR time by 10 minutes every 10 (realtime) seconds.
2. otherwise it sets wake timers 30 minutes in advance of the current
time each time it is waked, reporting on the current time each time
around.
So, it shows examples of:
1. how to set the society time (be careful!)
2. how to look at the society time.
3. how to request that your plugin be activated approximately at a
specific scenario time (or after scenario time has elapsed).
4. how to code a timer based on real (system) time.
to try it out:
One cluster ini file should have the following line (for the advancer)
plugin = org.cougaar.mlm.examples.ClockTest(advance)
another cluster should have (for the watcher):
plugin = org.cougaar.mlm.examples.ClockTest
|
ClockTest | public ClockTest()(Code) | | |
execute | public void execute()(Code) | | |
setupSubscriptions | public void setupSubscriptions()(Code) | | |
|
|