I want to display the time spent during sorting the list....BUT i get 0 everytime...is it bcuz it doesnt take less than a second to sort it..... here is the fucntion i am using:
----------------------------------------------
float Time(int flag)
{
static clock_t start;
clock_t end;
if(flag==START) //START=0
{
start = clock();
return 0.0;
}
else
{
end = clock();
return (end-start)/CLK_TCK;
}
}
--------------------------------------------------
is there anyway to display the time even if its less than a second...
plz help asap