mike55 Posted January 26, 2007 Posted January 26, 2007 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: System.Threading.Thread.Sleep(10000) Will this work with a web page, or is there a better approach? Mike55. Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
TheWizardofInt Posted January 26, 2007 Posted January 26, 2007 Dim dTime As Date = Now.AddSeconds(10) Do While Now < dTime Loop Quote Read the Fovean Chronicles Because you just can't spend your whole day programming!
Administrators PlausiblyDamp Posted January 27, 2007 Administrators Posted January 27, 2007 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. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.