Add timing logic