Add timing functionality