1.time (NULL) counting a minimum unit s
2.time.h
int main () { clock_t start, end; start = clock(); end = clock(); printf("%f",(float)(end-start)/CLK_TCK); }
3.windows.h shows the number of ms
DWORDstart,end; start= GetTickCount(); //…calculating… end= GetTickCount(); printf("time=%d\n",end-start);