Skip to content

common: Utils: Introduce a simple getRandom function

Abhishek Lekshmanan requested to merge f-get-random into master

This function creates a random number between [start,end] The random device is thread local, so only created once per thread so we can avoid a mutex access. rand() is not threadsafe and reseeds the generator based on previous output, this function should be a better generator than that.

Signed-off-by: Abhishek Lekshmanan abhishek.lekshmanan@cern.ch

Merge request reports