title: Erlang - Random Number gen with Makeref
body: <p>I am trying to generate a random enough number quickly.</p>
  
  <p>Right Now I am using the following:</p>
  
  <pre><code>uniqueID() -&gt;   C = random:uniform(9999) ,   %%%DO SPEED TEST
      random:seed(C,random:uniform(99),random:uniform(99)),
      {_, {H, Min, S}}  = calendar:universal_time(),
      {A, B} = statistics(wall_clock),
      (A*B) +((H + C + Min) * S).
  </code></pre>
  
  <p>It takes too long compared to something like make_ref().</p>
  
  <pre><code>6&gt; make_ref().
  #Ref&lt;0.0.0.74&gt;
  </code></pre>
  
  <p>How can I take the unique ref and parse it to become an integer?</p>
  
  <p>such as 00074</p>
  
  <p>Thanks for the help.</p>