Skip to content

Commit e87850f

Browse files
Missed Delay api adjustments
1 parent cacc910 commit e87850f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/main/java/com/pi4j/examples/games/snake

src/main/java/com/pi4j/examples/games/snake/Snake.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private void renderColor(int x, int y, int color) {
102102
public void run() {
103103
initialize();
104104
while (!exit) {
105-
delay.setDelayMillis(stepTimeMillis);
105+
delay.setMillis(stepTimeMillis);
106106
GameController.Direction direction = controller.getDirection();
107107
if (!armed) {
108108
armed = direction == GameController.Direction.NONE;
@@ -115,7 +115,7 @@ public void run() {
115115
}
116116
}
117117
step();
118-
delay.materializeDelay();
118+
delay.materialize();
119119
}
120120
display.fillRect(0, 0, display.getWidth(), display.getHeight(), 0xff000000);
121121
for (Map.Entry<ListenableOnOffRead<?>, Consumer<Boolean>> entry : keys.entrySet()) {

0 commit comments

Comments
 (0)