Skip to content

Instantly share code, notes, and snippets.

@seanmtracey
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanmtracey/9187682 to your computer and use it in GitHub Desktop.
Save seanmtracey/9187682 to your computer and use it in GitHub Desktop.
Simple Processing function to make your code wait for a period of time.
void wait(int timeToWait){
int startTime = millis();
while (millis() < (startTime + timeToWait));
}
@scruffyfox
Copy link

you can just terminate the while with a semicolon

while (millis() < (startTime + timeToWait));

@seanmtracey
Copy link
Author

Of course! Good shout :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment