title: Set a delay in libGDX
body: <p>I have now tried to set up a delay in libGDX in three different ways.</p>
  
  <p>First I tried to use a <code>Timer</code>, but if I restart the activity, the timer won't start again. This is a known issue when using <code>GestureDetector</code>: <a href="https://github.com/libgdx/libgdx/issues/2274" rel="nofollow noreferrer">https://github.com/libgdx/libgdx/issues/2274</a></p>
  
  <p>Then I tried setting up a timer using <code>Gdx.graphics.getDeltaTime</code> in my render method, but this doesn't work for me as I have set it to non-continous rendering. Described in answer #2 <a href="https://stackoverflow.com/questions/10798477/set-a-delay-in-libgdx-game">set a delay in libgdx game</a></p>
  
  <p>Finally I tried using a while loop and <code>System.getCurrentTimeMilliseconds</code>, however this prevented the application from recognizing a tap while the while loop was looping.</p>
  
  <p>I have also heard of <code>DelayAction</code>, but how does one implement that into the code? <a href="https://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/actions/DelayAction.html" rel="nofollow noreferrer">https://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/actions/DelayAction.html</a></p>
  
  <p>Is there another way of setting a delay? How do one implement <code>DelayAction</code>? Or how does one fix the <code>Timer</code> bug in libGDX?</p>