<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="../plugin.xsl" type="text/xsl"?>
<plugin name="ConstantTimer">
  <object class="org.ow2.isac.plugin.constanttimer.SessionObject">
    <params>
      <param name="duration_arg" type="String" />
    </params>
    <help>Provides a fixed duration timer, either to get a constant think time (see sleep timer),
or to get a fixed (minimum) time for a behavior sub-section (see period_begin/period_end timers).
Also supports a basic timeout feature through conditions to check if some execution time has elapsed
for a delimited behavior sub-section.
All durations are in milliseconds.</help>
  </object>
  <timer name="sleep" number="0">
    <params>
      <param name="duration_arg" type="String" />
    </params>
    <help>Sleeps for the given time, if any, or the default time set at plug-in import otherwise.</help>
  </timer>
  <timer name="period_begin" number="1">
    <help>Pseudo timer that performs no think time but simply sets a period_begin mark.</help>
  </timer>
  <timer name="period_end" number="2">
    <params>
      <param name="period_arg" type="String" />
    </params>
    <help>Sleeps during sufficient time so that the execution time elapsed from
  		the latest period_begin mark and this period_end included is at least
  		the specified duration, if any, or the default timer value set at plug-in import otherwise.
  		Of course, it may happen that the execution time of the delimited block is greater than the required
  		duration, in which case period_end does no sleep at all, but the delimited block is fully
  		executed however (should you want a more preemptive construct, include this block in an ISAC's preemption
  		statement, using this plug-in's time-out condition).</help>
  </timer>
  <test name="running" number="0">
    <help>True if a time-out timer has been initialized and
		its value has not been reached yet, false otherwise.</help>
  </test>
  <test name="passed" number="1">
    <help>True if a time-out timer has been initialized and
		its value has been reached, false otherwise.</help>
  </test>
  <sample name="reset" number="0">
    <help>Pseudo-sample: initializes a time-out timer, using the latest value set, if any,
		or the value set at plug-in import otherwise.</help>
  </sample>
  <sample name="set" number="1">
    <params>
      <param name="duration_arg" type="String" />
    </params>
    <help>Pseudo sample: initializes a time-out timer, with the provided value.</help>
  </sample>
</plugin>

