a closed loop frequency source includes a controllable oscillator that provides a first frequency source , a reference oscillator that provides a second signal , and a comparator that compares the two frequencies to provide an error signal that represents the difference between the frequencies . the error signal is used by an error signal generator to generate a compensation signal which offsets the carrier frequency that drives an output device such as a time - of - day clock so that the output device automatically gains or loses the previously accumulated time error without the necessity of being periodically updated .