GENERATE_MESSAGE() argument in milliseconds
This commit is contained in:
parent
32ac82fc22
commit
9dd0e076a6
1 changed files with 2 additions and 3 deletions
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: LogScriptEngine.java,v 1.16 2009/06/15 16:53:32 fros4943 Exp $
|
* $Id: LogScriptEngine.java,v 1.17 2009/06/15 17:39:02 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja.plugins;
|
package se.sics.cooja.plugins;
|
||||||
|
@ -394,7 +394,6 @@ public class LogScriptEngine {
|
||||||
|
|
||||||
public void generateMessage(long delay, final String msg) {
|
public void generateMessage(long delay, final String msg) {
|
||||||
final Mote currentMote = (Mote) engine.get("mote");
|
final Mote currentMote = (Mote) engine.get("mote");
|
||||||
|
|
||||||
TimeEvent generateEvent = new TimeEvent(0) {
|
TimeEvent generateEvent = new TimeEvent(0) {
|
||||||
public void execute(long t) {
|
public void execute(long t) {
|
||||||
if (scriptThread == null ||
|
if (scriptThread == null ||
|
||||||
|
@ -415,7 +414,7 @@ public class LogScriptEngine {
|
||||||
};
|
};
|
||||||
simulation.scheduleEvent(
|
simulation.scheduleEvent(
|
||||||
generateEvent,
|
generateEvent,
|
||||||
simulation.getSimulationTime() + delay);
|
simulation.getSimulationTime() + delay*Simulation.MILLISECOND);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue