I am trying to quickly create a random number.
Now I am using the following:
uniqueID() -> 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).
This takes too much time compared to something like make_ref ().
6> make_ref().
#Ref<0.0.0.74>
How can I take a unique ref and parse it as a whole?
e.g. 00074
Thanks for the help.
source
share