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.
 
Back
Top