Skip to content

Commit 6418fdb

Browse files
committed
I/O: Make delay(), delayMicroseconds() public
Those mirror Arduino's API, and should come in handy when waiting for very short intervals between I/O operations.
1 parent 5639e93 commit 6418fdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/libraries/io/src/processing/io/GPIO.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ protected static void checkValidPin(int pin) {
165165
* the sketch is going to achieve.
166166
* @param ms milliseconds to pause
167167
*/
168-
protected static void delay(int ms) {
168+
public static void delay(int ms) {
169169
try {
170170
Thread.sleep(ms);
171171
} catch (InterruptedException e) {
@@ -196,7 +196,7 @@ protected static void delay(int ms) {
196196
* you might be disappointed.
197197
* @param us microseconds to pause
198198
*/
199-
protected static void delayMicroseconds(int us) {
199+
public static void delayMicroseconds(int us) {
200200
int ms = (int)(us / 1000);
201201
int ns = (us - (ms * 1000)) * 1000;
202202
try {

0 commit comments

Comments
 (0)