title: How is time-based programming done?
body: <p>I'm not really sure what the correct term is, but how are time-based programs like games and simulations made?  I've just realized that I've only wrote programs that wait for input, then do something, and am amazed that I have no idea how I would write something like pong :)</p>
  
  <p>How would something like a flight simulator be coded?  It obviously wouldn't run as fast as the computer could run it.  I'm guessing everything is executed on some kind of cycle.  But how do you handle it when a computation takes longer than the cycle.</p>
  
  <p>Also, what is the correct term for this?  Searching "time-based programming" doesn't really give me helpful results.</p>