I would like to use the sleep function of the timer class and I would like to use it to make a process sleep for a random amount of time in between 0 and 1.
In order to do this, I tried:
timer:sleep(random:uniform()).
However, i get the following error message:
=ERROR REPORT==== 1-Apr-2014::21:39:32 ===
Error in process <0.472.0> with exit value: {timeout_value,[{timer,sleep,1,
[{file,"timer.erl"},{line,152}]},{myModule,myFunction,4,[{file,"myModule.erl"},
{line,46}]}]}
What is wrong with this?
Also, as I have multiple versions of the same process, how can I make sure that each start with a different random number?