  The Nuclear Spectroscopic Telescope Array (NuSTAR) mission is the first
focusing X-ray telescope in the hard X-ray (3-79 keV) band. Among the phenomena
that can be studied in this energy band, some require high time resolution and
stability: rotation-powered and accreting millisecond pulsars, fast variability
from black holes and neutron stars, X-ray bursts, and more. Moreover, a good
alignment of the timestamps of X-ray photons to UTC is key for multi-instrument
studies of fast astrophysical processes. In this Paper, we describe the timing
calibration of the NuSTAR mission. In particular, we present a method to
correct the temperature-dependent frequency response of the on-board
temperature-compensated crystal oscillator. Together with measurements of the
spacecraft clock offsets obtained during downlinks passes, this allows a
precise characterization of the behavior of the oscillator. The calibrated
NuSTAR event timestamps for a typical observation are shown to be accurate to a
precision of ~65 microsec.
