title: Limit while loop to run at 30 "FPS" using a delta variable C++
body: <p>I basically need a while loop to only run at 30 "FPS".
  I was told to do this:
  "Inside your while loop, make a deltaT , and if that deltaT is lesser than 33 miliseconds use sleep(33-deltaT) ."</p>
  
  <p>But I really wasn't quite sure how to initialize the delta/what to set this variable to. I also couldn't get a reply back from the person that suggested this.</p>
  
  <p>I'm also not sure why the value in sleep is 33 instead of 30.</p>
  
  <p>Does anyone know what I can do about this?</p>
  
  <p>This is mainly for a game server to update players at 30FPS, but because I'm not doing any rendering on the server, I need a way to just have the code sleep to limit how many times it can run per second or else it will process the players too fast.</p>