Timing sync or promise-returning functions