gdont

gdont

  • NA
  • 7
  • 0

Stop program execution for a specified time

Jan 8 2005 3:46 PM
How can I suspend a program's execution for a specified time? In particular, I want to make an event's code start running a specified time after the event fires. I think that it could help me solve the problem of firing the FileSystemWatcher.Created event which fires when a new file is being put into a "watched" folder. The problem arises when the file is big. Then the event fires before the creation of the new file is completed and the manipulation in the event handler procedure fails to execute. That is why I thought I could put an instuction in the event handler to "wait for" (i.e. an hour) but I do not remember how to do it. (any other idea to the problem will be welcomed) Thank you

Answers (4)