title: Properly seeding rand_r(int *val) method
body: <p>So I have multiple threads which will be using the rand_r function. The signature of this function is :</p>
  
  <pre><code>int rand_r(int *val);
  </code></pre>
  
  <p>I was trying to use the time to seed this function but I'm having all kinds of trouble. Could anyone explain to me how I would call rand_r using time, or some other simple way to seed rand_r dynamically. </p>
  
  <p>Thanks!</p>