Just use delay(): delay() / Reference / Processing.org But make sure it’s outside the “Animation” Thread.