Time-domain modeling of vacuum tubes is important for theoretical analysis of spurious oscillation, amplification and generation of short pulses and complex multifrequency, or chaotic signals. In this paper, a time-domain model of a klystron delayed feedback oscillator is presented. The model is based on the nonstationary Vainshtein theory of cavity excitation and the 1-D particle-in-cell method for simulation of electron beam dynamics. The results of simulation are presented for an S-band four-cavity klystron with delayed feedback, as well as for a miniaturized sub-terahertz reflex klystron. The developed code allows sufficiently fast and accurate calculation of output characteristics of klystron-type oscillators.