title: Comparing two times for equality within tolerance?
body: <p>I have an MFC application where I want a certain method to be called at specified times.  I will specify the times by using a vector of tm structs that have the hour minute and second filled out.  Possibly I may need to store a boolean value for each time to indicate whether the method was called at the specified time.  I have a timer that goes off every 50ms.</p>
  
  <p>In MFC, the time is not guaranteed to go off at the specified interval.  I want to ensure that the method is called even if off by a few seconds.  My application does not currently require precise timing (although I'm open to it if there is an easy solution).  My current thought on how to do this is to allow for some slippage such that I allow the time to be equal +/- a few seconds.  Does that seem like a reasonable way to achieve this?</p>
  
  <p>I want to check if two times are equal within a certain tolerance of seconds.  What's the best way to to this in c++?  I have access to a CTime object and/or a struct tm object (and potentially other windows time data structures)</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I guess there is actually added complexity in the case where the seconds is near the minute or hour boundary.  I can't just compare seconds.</p>