  We propose and demonstrate a simple method to accurately monitor and program
arbitrary states of partial crystallization in phase-change materials (PCMs).
The method relies both on the optical absorption in PCMs as well as on the
physics of crystallization kinetics. Instead of raising temperature
incrementally to increase the fraction of crystallized material, we leverage
the time evolution of crystallization at constant temperatures and couple this
to a real-time optical monitoring to precisely control the change of phase. We
experimentally demonstrate this scheme by encoding a dozen of distinct states
of crystallization in two different PCMs: GST and Sb2S3. We further exploit
this time-crystallization for the in-situ analysis of phase change mechanisms
and demonstrate that the physics of crystallization in Sb2S3 is fully described
by the so-called Johnson-Mehl-Avrami-Kolmogorov formalism. The presented method
not only paves the way towards real-time and model-free programming of
non-volatile reconfigurable photonic integrated devices, but also provides
crucial insights into the physics of crystallization in PCMs.
