It sounds like you're on the right track, but approaching this the wrong way. Check out the Timer class, ...
stackoverflow.com