Added switch toggling between on and off. Connected it to a global timer. Calculated time elapsed between on and off.