Hi ,
Its a code in module of my program, where I need to print current time (HH:MM:SS) at regular intervals. I excluded other code for understanding.
Code:#include<time.h> #include<stdio.h> //#include<windows.h> void delay(unsigned int t){ // loop for some delay. int k; while(t--) for(k=0;k<1275;k++); } void main(){ printf("Time: %s",__TIME__); delay(10000); // Sleep(10000); printf("\nTime: %s",__TIME__); }
But when I am running this code I expect this to print difference in time due to delay.
But it doesn't enter the delay loop, why ?
Regards,
Raady.