Adding timing code.