Adding a 10 second delay

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

All,
I am using a while loop like so

bool bProcess = true;
while (bProcess)
{
//Do some processing
//update to Database
if (tablelocked)
{
wait 10 seconds try again;
break;
}
else
{
commit;
bProcess = false;
}
}

How do i set a timer for 10 seconds before resuming the while loop.

AAny help is appreciated
Jawahar
 
In transactional database terms, 10 seconds is absolutely AGES.
Try waiting for about 0.1 seconds, maybe?
But System.Threading.Thread.Sleep(time) is the call to do it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top