We consider a double single-level quantum dot system with two embedded and nonaligned spin impurities to manipulate the magnitude and polarization of the electron-spin density. The device is attached to semiinfinite one-dimensional leads which are treated exactly. We provide a real-time description of the electron-spin dynamics when a sequence of ultrafast voltage pulses acts on the device. The numerical simulations are carried out using a spin-generalized modified version of a recently proposed algorithm for the time propagation of open systems ͓Kurth et al., Phys. Rev. B 72, 035308 ͑2005͔͒. Time-dependent spin accumulations and spin currents are calculated during the entire operating regime, which includes spin-injection and read-out processes. The full knowledge of the electron dynamics allows us to engineer the transient responses and improve the device performance. An approximate rate equation for the electron spin is also derived and used to discuss the numerical results.