public class YieldToEvents extends Object
The class allows you to specify the minimum interval to wait between yields and the maximum length of time to wait during a yield.
The class calls the Device.yieldToEvents() method to accomplish this. This method will call the GUI yieldToEvents() method if one exists, otherwise the default yieldToEvents() is used.
Constructor and Description |
---|
YieldToEvents(int forHowLong,
int atIntervalsOf)
Create a new YieldToEvents.
|
Modifier and Type | Method and Description |
---|---|
void |
set(int forHowLong,
int atIntervalsOf)
Modify the parameters of this YieldToEvents.
|
boolean |
yield()
Yield to events if there are pending events and if the minimum interval has
elapsed.
|
public YieldToEvents(int forHowLong, int atIntervalsOf)
forHowLong
- the maximum length of time in milliseconds to yield.atIntervalsOf
- the minimum length of time in milliseconds to elpase
between yields.public void set(int forHowLong, int atIntervalsOf)
forHowLong
- the maximum length of time in milliseconds to yield.atIntervalsOf
- the minimum length of time in milliseconds to elpase
between yields.public boolean yield()