title: sleep() in ncurses application
body: <p>I'm trying to make a <em>text animation</em> for an application made in ncurses. </p>
  
  <p>User presses a key, selects a direction and an object in a text grid should move from one cell of the grid to the next in the given direction, waiting 500ms before it moves. The code I used is        </p>
  
  <pre><code>while (!checkcollisions(pos_f, input)) { // Checks if it can move to next grid
      pos_f = moveobject(pos_f, input, ".."); // Moves object to next cell
      usleep(50000);
  }
  </code></pre>
  
  <p>But when I execute it, instead of moving, waiting and moving again, it waits a long time, and the object suddenly appears at the final cell of the grid, without showing the <em>animation</em>.</p>
  
  <p>Is this because of how ncurses work? I already tried using other solutions like the select() stalling function.</p>