Add code to measure rendering time