Halting processing for a specific time

mike55

Contributor
Joined
Mar 26, 2004
Messages
727
Location
Ireland
Hi all

I am pooling a payments gateway looking for a response for a transaction. The payments gateway requires me to wait for 10 seconds between each pool, therefore I am considering using the following command:
Code:
System.Threading.Thread.Sleep(10000)

Will this work with a web page, or is there a better approach?

Mike55.
 
The Thread.Sleep will impact on system resources far less than the loop so out of the two I'd plump for that one.

Be aware though if you are doing this in the code behind a web page it will increase the time it takes to refresh the page and this could cause users to think it has hung.
 
Back
Top