Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

How do I make a C# program sleep for a given number of milliseconds>

Posted on 2004-08-28
Last Modified: 2010-04-15
I've tried "sleep", I've tried "delay.  Both without luck.  And WAITFOR related to SQL Server.

Thanks for the help.  I'm sure it's obvious, but sometimes the most obvious problems are the worst to solve.

Thank you.
Question by:ba272
LVL 22

Accepted Solution

cookre earned 400 total points
ID: 11923719

Note that that causes the entire thread or process to pause.

How do you determine that it didn't pause?


Author Comment

ID: 11923731
Thanks.  I'll give it a try.
LVL 15

Expert Comment

ID: 11924235
It's in the System.Threading namespace if you can't find it.

Expert Comment

ID: 11939095

X = number of milisecconds to sleep.

Expert Comment

ID: 11950119
also could you describe WHY you want this,.. we could offer other solutions too,...


Floris Briolas

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows Media Player 2 31
Switching Visual Studio 2015 to normal debug display 3 38
jquery + C#.net radiobuttonlist 3 30
How to repeat the data 4 17
Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question