clock_gettime does not return the time offset from the epoch
Closed this issue · 2 comments
olivierpierre commented
See here:
make
./prog
time: 1617052216
make test
# ...
time: 0
olivierpierre commented
This is particularly problematic for programs wanting non-deterministic RNG as srand(time(NULL))
will always initialize the RNG with the same seed, 0
.
olivierpierre commented
Fixed in this commit