|
Rohit Nair
09/28/2011 3:24 PM
post89124
|
Hello,
I am seeing some weird behavior when I run ClockCycles tightly in a loop. ClockCycles should always return increasing
values, but sometimes it returns a value that's less than the previously returned value.
For example -
ThreadCtl(_NTO_TCTL_RUNMASK,(int*) 0x1);
perror(NULL);
start = ClockCycles();
while(1)
{
stop = ClockCycles();
if(start > stop)
{
diff = start - stop;
printf("??? start-%llu, stop-%llu,diff-%llu, iteration - %d\n",start,stop,diff,iter);
break;
}
start = stop;
iter++;
}
The iteration at which it happens is widely random. Ranging from 50 to 30000.
Could this be because of a wrong setup in init_qtime.c inside startup code ?
|
|
|
|
|