Changed type of elapsed time to NSTimeInterval.