Millisecond timer in Lovelace?

I need to display the time in Milliseconds (ie 1.27 seconds) between the switching of state of an entity in lovelace in realtime. Is there such a thing?