473,473 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

delay second output for 3 secs

12 New Member
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
2 2119
horace1
1,510 Recognized Expert Top Contributor
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
andersod
9 New Member
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

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

Similar topics

12
by: Conrad | last post by:
Greetings, Q: Is there some way to gracefully suspend a python app for a second or so then resume? I could write the classic basic dumb loop-tenzillion-times delay, but that seems inelegant, and...
14
by: Des L. Davis | last post by:
System: Dell PowerEdge Server with 3 GB RAM, 2.4 GHz Celeron Software: Microsoft SQL Server 2000 Enterprise running on Windows 2003 Server Software: Microsoft SQL Server 2000 Enterprise running on...
7
by: mfeingold | last post by:
I am working on a system, which among other things includes a server and a ..net control sitting in an html page and connected to the server. I ran into a couple of problems, you guys might have...
10
by: AmitTrehan | last post by:
hi friends, I want to know how can we insert delay in vb.net like..... i want to show two strings on same label first one string then break of 5 secs and then second string how can i acheive...
37
by: ales | last post by:
Hello, I have a problem with creation of new thread. The method .Start() of newly created thread delays current thread for 0 - 1 second. Cpu while delay occurs is about 5%. Any idea? Here...
7
by: Ian Davies | last post by:
I have a script which uploads files to my site. I limit file size and the files upload quickly The a summary of what happens is MESSAGE "Uploading bla bla bla file details bla bla bla Script to...
2
by: Umeshnath | last post by:
Hi, I have a web application that refreshes a label control every 1 sec (interval set by timer control). I am using Atlas panel for refreshing. Basically I have a method say PollMSMQ(), which...
0
by: Jonathan Mark | last post by:
hi all... I wrote a seemingly simple function (below) to use Popen3() and select() to run a program and capture its exit status, stdout output, and stderr output. It worked fine until the box...
5
by: IgorZ | last post by:
Hello i made a program based on the tutorial on youtube. It's suppose to calculate the average between 3 numbers so i got some questions about that. 1. How to detect when a person enters a number...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.