In code block you can use
Sleep(unsigned int miliseconds);
function for delay in execution.
delay(unsigned int miliseconds) function is used in turbo c. For codeblocks you have to add code which is given below example:
Sleep(unsigned int miliseconds);
function for delay in execution.
delay(unsigned int miliseconds) function is used in turbo c. For codeblocks you have to add code which is given below example:
#include<stdio.h>
#include<time.h>
void delay(unsigned int mseconds)
{
clock_t goal = mseconds + clock();
while (goal > clock());
}
int main()
{
int i;
for(i=0;i<10;i++)
{
delay(1000);
printf("This is delay function\n");
}
return 0;
}
I was looking for this. Thank you.
ReplyDeleteThnks a lot!!
ReplyDeletetknsss tnksss
ReplyDeletethanks for dealy function
ReplyDeleteFinally the answer I was looking for.. Thank you
ReplyDelete