Rework timing calculation to use events