3 ms·
If you're generating random test case input on a single machine, time() is a perfectly reasonable way to seed a PRNG. A super-robust entropy source isn't a nece
by kevin_thibedeau 12y ago
If you're generating random test case input on a single machine, time() is a perfectly reasonable way to seed a PRNG. A super-robust entropy source isn't a necessity when you just want something nominally random between intermittent runs.
- deleted 12y ago[deleted]
- nitrogen 12y ago...nominally random between intermittent runs. That's a lot of caveats. Suppose you want to run multiple times in one second. Suppose you want statistically uniform random numbers to ensure even coverage of test cases.
- xorcist 12y agoAlso if your clock resets on boot for some reason, and boot time is predictable.
- CHY872 12y agoFor test case generation, I'd argue that you want the opposite of a time initialised random number generator. You'd want a deterministic seed for your random number generator, so you can repeat if required.