Delay() in C#

hi, i want to know if there's a way to implement the VB's Delay() function in C# to stop the code from running in a an amount of time. Or if the .NET framework comes with a special class about it.



Answer this question

Delay() in C#

  • Travis Illig

    Thank you very much!, it really helped
  • Michael Mortensen

    >>thread latency which I believe is down to 10ns on XP. It can be as high as 25ns howeve

    Er, I think you mean milliseconds, not nanoseconds.


  • Atul Nisar

    The standard mechanism for delaying a thread is Thread.Sleep(milliseconds). This will cause the thread to efficiently sleep but has a resolution equal to the thread latency which I believe is down to 10ns on XP. It can be as high as 25ns however.

    Michael Taylor - 7/25/06


  • somegai

    Off by one error. Sorry about that :}

    Michael Taylor - 7/26/06


  • Delay() in C#