Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

Sedo - Buy and Sell Domain Names and Websites project info: programmershelp.co.uk Statistics for project programmershelp.co.uk etracker® web controlling instead of log file analysis

   Misc

   Amazon

   Links

    


Pause a program
 

 

 

Description

This example will pause a program for a specified period of time using the sleep() function , this depends a lot on the compiler , this example was tested with Turbo C from Borland . It DOESNT work with Visual C++ 6 for example . This example will pause for 5 seconds.

Code

#include <stdio.h>
#include <dos.h>

int main()
{
printf("Im going to sleep now\n");
sleep(5);
printf("Ive woken up again\n");

return 0;
}

Information

Tested with Turbo C

 

 

 

 

Download

sleep.txt


 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
start windows explorer(Powershell)
Cool GD effect(PHP)
redirection function(Javascript)
Backwards text(Javascript)
php and java example(PHP)
list all databases(php)
Display all available drives(ASP)
show all files in a directory(VB.net)

    




Copyright © 2003 by programmershelp.co.uk