Stability of time-varying delay systems and applications