title: Put a timer on a function inside while loop
body: <p>There's lots of questions about it but I don't quite get it yet.<br>
  I have to upload some code into a server to run 24/7, and this code will be basically something like this:  </p>
  
  <pre><code>while True:
      variable1 = function1()
      variable2 = function2()
      variable3 = function3()
  </code></pre>
  
  <p>So let's say I want to do <code>variable2 = function2()</code> once every hour or so, for performance (I don't understand much about it, but I think it'll do good to put a timer on it)  </p>
  
  <p>I can't use <code>time.sleep()</code> on it because the code has to keep going<br>
  I mentioned the server thing because I don't know if answers using a system timer works with it, I'm still learning how to do it.<br>
  Forgot to say I'm using Python 2.7</p>