Posted in
You need to include the lejos.realtime.* package in your program.
You can also include others packages to allow any of the standard lejos classes to be used in the program.
For example :
import lejos.charset.*; import lejos.nxt.LCD; import lejos.nxt.comm.*; import lejos.io.*; import lejos.realtime.*; import lejos.util.*; import lejos.nxt.*; import java.lang.*;
Here is an example to create a RealTimeThread :
RealtimeThread t2 = new RealtimeThread(new PriorityParameters(19),new PeriodicParameters( new RelativeTime(0,0), //start new RelativeTime(3000,0), // period new RelativeTime(2000,0), // cost new RelativeTime(3000,0), null, null)) { // deadline public void run() { do{ }while(waitForNextPeriod()); } };
Take a look to the API for more details.