rand() gives you a new random number every time you call it. Time has nothing to do with it.

The only way time has anything to do with it is when you seed the RNG with srand()... which you should only be doing once. The mistake you're making is probably seeding every time you generate a number, which is wrong.

Perhaps I worded my problem wrong. So I seed rand once, but I generate random numbers in a loop, in essence getting the same number for several thousand times until rand() switches to a new number, and then spits it out for another few thousand times. I want to know how to change this, so that, in this case, rand() would switch random numbers every millisecond. The case is that I am calling rand() repeatedly.