Delay

This is a discussion on Delay within the C++ Programming forums, part of the General Programming Boards category; Is there a delay routine for C/C++ programs. I want a delay function that pauses my program, stops execution for ...

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    70

    Delay

    Is there a delay routine for C/C++ programs.

    I want a delay function that pauses my program, stops execution for a certain amount of seconds/microseconds.

    Does one already exist?? (In the standard C/C++ library)
    NOTE: I use MSVC++ 6;

    Ciao

  2. #2
    Just a Member ammar's Avatar
    Join Date
    Jun 2002
    Posts
    953
    you can use sleep()

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    There are several solution. I recommend multiple threads and delays via Sleep() for Win32 console applications.

    Kuphryn

  4. #4
    Registered User
    Join Date
    Sep 2002
    Posts
    70
    Hey,

    What header file do i need to include, and how do i use the function??

    Ciao

  5. #5
    Registered User abrege's Avatar
    Join Date
    Nov 2002
    Posts
    369
    windows.h, Sleep(miliseconds)
    I am against the teaching of evolution in schools. I am also against widespread
    literacy and the refrigeration of food.

  6. #6
    Registered User
    Join Date
    Sep 2002
    Posts
    70
    thanx, this function is very useful

    Ciao

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Regarding delay in the connection
    By byatin in forum Networking/Device Communication
    Replies: 2
    Last Post: 08-19-2008, 03:59 PM
  2. temperature sensors
    By danko in forum C Programming
    Replies: 22
    Last Post: 07-10-2007, 08:26 PM
  3. Networking (queuing delay, avg packet loss)
    By spoon_ in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 09-05-2005, 12:23 PM
  4. 2-3 Second delay with alarm()
    By Longie in forum C Programming
    Replies: 11
    Last Post: 06-20-2004, 09:46 PM
  5. Delay
    By CanadianOutlaw in forum C++ Programming
    Replies: 4
    Last Post: 09-13-2001, 07:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21