changed the timeout monitoring function to not check the arrival
  time of messages too frequently.