Thread: how to delay

  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    19

    how to delay

    printf("hi");

    "delay 3 seconds then display"

    printf("hello");

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    On Windows:
    Code:
    Sleep( 3000 );
    On UNIX:
    Code:
    sleep( 3 );
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

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, 02:59 PM
  2. temperature sensors
    By danko in forum C Programming
    Replies: 22
    Last Post: 07-10-2007, 07: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, 11:23 AM
  4. 2-3 Second delay with alarm()
    By Longie in forum C Programming
    Replies: 11
    Last Post: 06-20-2004, 08:46 PM
  5. Delay
    By CanadianOutlaw in forum C++ Programming
    Replies: 4
    Last Post: 09-13-2001, 06:28 AM