Measuring crystal structure dynamics during polymorphic phase transitions