This report describes a software program that functions as a radio clock using shortwave radio signals transmitted by National Institute of Standards and Technology (NIST) radio stations WWV and WWVH. Operated in conjunction with an inexpensive, fixed-frequency shortwave radio, it has nominal timing errors less than 125 µs when tracking one of the stations and frequency variations less than 0.5 parts-per-million (PPM) when not tracking either station. The clock produces an ASCII timecode that can be used to set the time of another device, such as a computer, as well as precision reference signals that can be used for other purposes, such as to drive laboratory test equipment. The primary motivation for this report is as an example and case study of optimum demodulator and decoder design using a maximum likelihood approach and matched filter, synchronous detection and soft decision principles. The clock discipline is modelled as a Markov process, with probabilistic state transitions corresponding to a conventional time-of-century clock and the probabilities of received decimal digits. The result is a performance level which results in very high accuracy and reliability, even under conditions when the one-minute beep from the WWV/H signal,