Temporal model for quasi-phase matching in high-order harmonic generation.