# Visual Basic 2008/2010 Help



## shuggans (Mar 7, 2011)

I need to find a way to stop a piece of code from executing for 3 - 5 minutes of time.  I wrote a directory monitor to watch and use a video converter convert an mpg into a flash video and generate HTML pages once they are placed into a content folder, however the time it takes to do the conversion is throwing my code off.  If anyone could help me find the simplest way to stall the execution of the html generation code for 5 minutes it would be greatly appreciated.


----------



## streetfighter 2 (Mar 7, 2011)

I'm not sure I understand the question but:
http://msdn.microsoft.com/en-us/library/d00bd51t.aspx
http://msdn.microsoft.com/en-us/library/0ekfkkw6(v=vs.80).aspx

If my understanding of your post is correct, then I suggest altering your program to remove the issue.  While the file is being converted it should be placed in an unwatched temporary directory.  Only when it has completed conversion should it be placed in the watched directory.


----------



## temp02 (Mar 7, 2011)

I did not fully understand what exactly and why you are trying to stall the process, but if both "your code" and the "html generation" are being executed sequentially you could fork the two by using Threads and then have both "your code" and the "html generation" executing at the same time, perhaps.

*EDIT:* Damn *streetfighter 2* beated me


----------

