236237238239240241242243244245246
if (cpu == null) { context.err.println("could not access the CPU."); return 1; } cpu.scheduleTimeEventMillis(new TimeEvent(0) { @Override public void execute(long t) { if (isRunning) { count++;
244245246247248249250251252253254
public void execute(long t) { if (isRunning) { count++; context.executeCommand(commandLine); if ((maxCount <= 0) || (count < maxCount)) { cpu.scheduleTimeEventMillis(this, period * 1000d); } else { stopCommand(context); } } }