I don't seem to be able to reproduce it. I rewrote your program to run in an infinite loop and track the min/max values, like this:
Code:
#include <time.h>
#include <stdio.h>
int main(void)
{
int minT = 10000, maxT = 0;
int t = 0;
do {
clock_t ticks1 = clock(), ticks2 = ticks1;
while((ticks2/CLOCKS_PER_SEC-ticks1/CLOCKS_PER_SEC) < 1)
ticks2=clock();
t = ticks2 - ticks1;
if (minT > t) minT = t;
if (maxT < t) maxT = t;
printf("Took %d ticks to wait one second (%d, %d, min=%d, max=%d).\n",t, (int)ticks1, (int)ticks2, minT, maxT);
} while(1);
return 0;
}
The first time, I get a start of 15 and end of 1015.
--
Mats