SystemFileWatcher question

  • Thread starter Thread starter bill salkin
  • Start date Start date
B

bill salkin

I'm concered with the CPU load that a FileSystemWatcher
instance can cause. Is there a way to have the 'Watcher
check for a new file evry 5 or 10 seconds?

Bill
 
The FileSystemWatcher works by hooking system-level events, so it's already
efficient. However, you don't have to handle the events it raises
immediately--you can put them into a queue and handle them periodically,
based on a timer as you suggest, or during application idle time, or
whatever you need.
 
Back
Top