By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,419 Members | 1,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,419 IT Pros & Developers. It's quick & easy.

delay second output for 3 secs

P: 12
I want to delay my second output for 3 seconds, what the code I should put?

Example output:

Checking Printer buffer.....

(After 3 secs)

Dokumen in printing

Below is my sample code, what code I should add to below?

{printf("Checking printer buffer...");}
if(i > 4)
for (j=0;j<5;j++)
printf("\Dokumen in printing....", buffer[j]);
Mar 7 '07 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 1,510
I want to delay my second output for 3 seconds, what the code I should put?

Example output:

Checking Printer buffer.....

(After 3 secs)

Dokumen in printing

Below is my sample code, what code I should add to below?

{printf("Checking printer buffer...");}
if(i > 4)
for (j=0;j<5;j++)
printf("\Dokumen in printing....", buffer[j]);
do not double post, you have already asked this question
http://www.thescripts.com/forum/thread613027.html
Mar 7 '07 #2

P: 9
hi,
try

#define __cpp_stdc
#include <stdio.h>
#include <unistd.h>

void SLEEP(int x)
{
sleep(x);
}
int main() {
printf("line 1\n");
fflush(stdout);
SLEEP(10);
printf("line 1\n");
fflush(stdout);
return(0);
}
Mar 9 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.