Possible Duplicate:
Recommended way to initialize srand?
I have the following problem when using srand() in c.
I call srand(time(NULL)) in a loop, but the loop finishes before 1 sec and every time I call the rand() I get the same value.
How can I solve this?