Add timer to measure time elapse.