camera.clear_image_buffer() phone.open_app() camera.look_for_image() elapsed_time = camera.timestamp - phone.start_timestamp print(" Elapsed time:", elapsed_time) if args.save: results.write(f"{i+1}, {elapsed_time}\n") time.sleep(0.5) if args.type == "warm": print(" Closing app\n") phone.close_app() else: print(" Quitting app\n") phone.quit_app() # Stop main timer main_timer_stop = time.perf_counter() main_timer_duration = main_timer_stop - main_timer_start print("Total time:", str(datetime.timedelta(seconds=main_timer_duration))) # Close results file if args.save: results.close() # When done, return to starting position phone.go_to_start_position() camera.clean_up()