We propose a novel scheme for the all-optical generation of pulse trains in optical fibers based on the reflection and refraction of pulses at a time boundary, and the temporal analogue of a laser cavity with gain. Furthermore, this scheme is shown to provide an original and simple way to measure distributed fiber parameters. In particular, we put forth an application of the temporal laser to the distributed sensing of the fiber group-velocity dispersion parameter.