Thread: sleep?

  1. #1
    Unregistered
    Guest

    sleep?

    Can I use sleep(); in c++?
    And if so what header is it in?

  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    Sleep functions are non-standard. What compiler are you using?
    zen

  3. #3
    Unregistered
    Guest
    borland c++ builder, but i´m writing an console app.

  4. #4
    Registered User cody's Avatar
    Join Date
    Sep 2001
    Posts
    86

    Re: sleep?

    Aloa he,

    Can I use sleep(); in c++?
    Yes you can.

    And if so what header is it in?
    Well, that depends which OS and compiler you're using.
    For example there is a "Sleep(miliseconds)" function in the
    winbase.h and a sleep(miliseconds) in uhm...damn, forgot the header unter linux ... but there is one

    Greetings
    cody
    #include "reallife.h"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [pthread] cancellable sleep in win32?
    By cyberfish in forum C++ Programming
    Replies: 2
    Last Post: 08-11-2007, 02:30 AM
  2. Sleep works with just one thread, but not 2
    By finkus in forum C++ Programming
    Replies: 5
    Last Post: 12-01-2005, 09:17 PM
  3. Problem with Sleep() #$@^#$%^
    By intruder in forum C++ Programming
    Replies: 8
    Last Post: 10-11-2004, 06:46 AM
  4. why do we require sleep?
    By jinx in forum A Brief History of Cprogramming.com
    Replies: 43
    Last Post: 07-14-2004, 08:21 AM
  5. Sleep is overrated...
    By Polymorphic OOP in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 01-24-2003, 12:40 PM