Hey,
I need to seed the random number generator in boost (which is loaded from an int) for a few processes, for a program that has to compile and work both in Windows and in Linux.
I used std:time(0)
, which worked, but since the processes are jobs which are run simultaneously, some of them would run at the same second, producing the same results.
So I need to seed it from milliseconds, or any other cross-platform random generator for that matter. I tried clock()
but couldn't quite make it convert from time_t
to int.
Thanks.