Use integer instead of double to compute ellapsed time.