I have a very simple executable file that checks a specific folder every 3 seconds to see if the file (s) are there. If he finds the file (s), he does something, and then returns to the folder check every 3 seconds.
People report that sometimes this executable file occupies 50% of its processor, are there any suggestions on how to do this correctly. Below is a sample code of how I do this.
// Check our folder every x seconds
Timer = new System.Threading.Timer(TimerCallback, null, 0, Global.SecondsToCheckPrintFolder * 1000);
source
share