I need to plant a random number generator in boost (which is loaded from int) for several processes, for a program that needs to compile and work on both Windows and Linux.
I used std:time(0)one that worked, but since processes are tasks that run simultaneously, some of them will run in one second, producing the same results.
So I need to sow it in milliseconds or any other cross-platform random generator. I tried clock(), but could not convert it from time_tto int.
Thank.
source
share