Time-resolved, high-accuracy and high-resolution spectroscopy of rapidly tuned continuous-wave lasers is critical to realizing their full potential for sensing, but is not possible with conventional spectrometers. We demonstrate a coherent dual-comb-based spectrometer capable of measuring continuous-wave optical waveforms at time resolutions of 30 µs and 320 µs over terahertz bandwidths. Within each time interval, the spectrometer returns the laser frequency spectrum with kilohertz absolute accuracy and time-bandwidth limited precision. Unlike etalon-based techniques, each measurement is independently calibrated, which allows for discontinuous source tuning between measurements and the characterization of arbitrary continuous-wave waveforms. To demonstrate the broad applicability of the technique, we measure a laser during a nonlinear scan over 28 nm, a laser step-scanned over a 42-nm span containing several molecular absorption lines, a mechanically perturbed laser, and two lasers tuned simultaneously. Our approach should enable optimized waveforms for sensing applications including multispecies gas detection1,2,3, coherent laser radar4,5,6 and optical metrology7,8,9.