Hi Koby,
Am new at this. but since you used the word "interrupt", I am assuming that you dont want to be blocked. This is what suggest. I think thread should do the job for you.
You have your main thread and you create another Checker thread.
The checker thread does whatever you want to check for and then sleeps for 5 seconds. I am assuming that sleep() in C# is non-blocking.
Alternate idea ...
use a timer, which when expires will pass the control to something like OnTimerExpired() which will do your checking ... but since I havent done much with timers I am not sure if it will be as it sounds
|