fixed a bug where the scheduled time is not the executed one
This commit is contained in:
parent
44c317ce1c
commit
abe8e024ce
|
@ -334,7 +334,7 @@ public abstract class MspMote extends AbstractEmulatedMote implements Mote, Watc
|
|||
/* Execute MSPSim-based mote */
|
||||
/* TODO Try-catch overhead */
|
||||
try {
|
||||
nextExecute = myCpu.stepMicros(t-lastExecute, duration) + t + duration;
|
||||
nextExecute = myCpu.stepMicros(Math.max(0, t-lastExecute), duration) + t + duration;
|
||||
lastExecute = t;
|
||||
} catch (EmulationException e) {
|
||||
String trace = e.getMessage() + "\n\n" + getStackTrace();
|
||||
|
|
Loading…
Reference in a new issue