init RNG for everybody using time()
svn-id: r10796
This commit is contained in:
parent
e9dacde3c5
commit
0aa58f53c8
3 changed files with 5 additions and 6 deletions
|
@ -75,8 +75,10 @@ void hexdump(const byte * data, int len, int bytesPerLine) {
|
|||
printf("|\n");
|
||||
}
|
||||
|
||||
RandomSource::RandomSource(uint32 seed) {
|
||||
_randSeed = seed;
|
||||
RandomSource::RandomSource() {
|
||||
// Use system time as RNG seed. Normally not a good idea, if you are using
|
||||
// a RNG for security purposes, but good enough for our purposes.
|
||||
setSeed(time(0));
|
||||
}
|
||||
|
||||
void RandomSource::setSeed(uint32 seed) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue