The period of individual type-I edge-localized modes (ELMs) in TCV H-mode plasmas is controlled by real-time controlled application of electron cyclotron (EC) power close to the plasma pedestal. An ELM pacing algorithm, closely related to sawtooth pacing [Goodman et al (2011 Phys. Rev. Lett. 106 245002)] has been implemented in the TCV control system. This algorithm switches the EC power to a low level after detecting an ELM, and subsequently increases the power to a higher level after a pre-set time interval, stimulating the advent of the next ELM. While the mean ELM period is observed to depend only on the mean power applied, ELM pacing is shown to significantly regularize the ELM period with respect to the case of continuously applied power. It is also shown that the ELM period can be changed from one ELM to the next on time scales shorter than the global energy confinement time. These results present a challenging benchmark to physics-based pedestal models and can point towards obtaining a deeper understanding of the physics of individual ELM cycles.