Pause or wait??

This is a discussion on Pause or wait?? within the C# Programming forums, part of the General Programming Boards category; I need a way to pause for like 1 second at the end of while loop....does anyone have any idea ...

  1. #1
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101

    Pause or wait??

    I need a way to pause for like 1 second at the end of while loop....does anyone have any idea how to do this???

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,668
    There is no Sleep function somewhere hidden in C#?

  3. #3
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101
    Quote Originally Posted by Elysia View Post
    There is no Sleep function somewhere hidden in C#?

    Actually I just used this:
    Code:
     System.Threading.Thread.Sleep(100);

  4. #4
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,668
    Yes, that's sleep.

  5. #5
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    100 Milliseconds don't make a second. Try 1000.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  6. #6
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,668
    Sometimes you might not want to Sleep for a second. Sometimes you just want to sleep enough not to tax the processor, which is usually 100ms or lower.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 10-15-2008, 09:24 AM
  2. Signals, fork(), wait() and exec()
    By DJTurboToJo in forum C Programming
    Replies: 7
    Last Post: 03-18-2008, 09:14 AM
  3. Boom, Headoshot!!
    By mrafcho001 in forum A Brief History of Cprogramming.com
    Replies: 50
    Last Post: 07-21-2005, 08:28 PM
  4. anybody with experience using the wait() function?
    By flawildcat in forum C Programming
    Replies: 7
    Last Post: 04-22-2002, 02:43 PM
  5. Pause function ???
    By Unregistered in forum C++ Programming
    Replies: 8
    Last Post: 09-02-2001, 08:22 PM

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