[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to delay a process.

Posted on 2013-11-15
2
Medium Priority
?
350 Views
Last Modified: 2013-11-16
I am executing three processes:

       BuildSymbolWork1(strSourcePath + "AMEX.txt", conStockSelect,"AMEX");
       BuildSymbolWork1(strSourcePath + "NASDAQ.txt", conStockSelect,"NASDAQ");
       BuildSymbolWork1(strSourcePath + "NYSE.txt", conStockSelect,"NYSE");

 private void BuildSymbolWork1(string pstrSourceFile, SqlConnection pconStockSelect,string pstrMarketName)
        {
       
Do Stuff
}

The processes work, except that the processing never stops.

All is fine when I run in debug mode and set a break point before each BuildSymbolWork1()


The process continues forever when Start Without debugging.

How can I delay after each execution?

      BuildSymbolWork1(strSourcePath + "AMEX.txt", conStockSelect,"AMEX");

//Delay 5 seconds
       BuildSymbolWork1(strSourcePath + "NASDAQ.txt", conStockSelect,"NASDAQ");

//Delay 5 seconds

       BuildSymbolWork1(strSourcePath + "NYSE.txt", conStockSelect,"NYSE");

//Delay 5 seconds

Thanks
0
Comment
Question by:Dovberman
[X]
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
2 Comments
 
LVL 36

Accepted Solution

by:
Miguel Oz earned 2000 total points
ID: 39652835
You can use Sleep method, for example:
Thread.Sleep(5000);//Delay 5 seconds
0
 

Author Closing Comment

by:Dovberman
ID: 39653171
Just what I needed.

Thank you.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

649 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