Hey guys,
I have started exploring the time library, but I can't understand it:
I have got three questions:Code:#include<stdio.h> #include<time.h> int main(void) { clock_t h; //first assignment h = clock(); while(h != 9) { //second assignment h = clock(); printf("%d\n",h); } system("pause"); return 0; }
1. If I am not doing first assignment of 'h' than the program is not working properly, why?
2. What does h gets assigned to? Is it seconds?
3. How can I make a program to print something for few seconds?
Any help will be appreciated.