An ophthalmic device comprises an ultrasonic transducer, an accommodation actuator, and a controller. When the ophthalmic device is mounted in or on an eye of a user, the ultrasonic transducer is positioned to direct ultrasonic signals towards ciliary processes in the eye and the accommodation actuator is positioned to focus light entering the eye. The controller is coupled to the ultrasonic transducer and the accommodation actuator. The controller includes logic that when executed by the controller causes the ophthalmic device to perform operations including emitting the ultrasonic signals from the ultrasonic transducer towards the ciliary processes, receiving reflected ultrasonic signals from the ciliary processes with the ultrasonic transducer, calculating a time of flight between emitting the ultrasonic signals and receiving the reflected ultrasonic signals, and adjusting an optical power of the accommodation actuator based on the time of flight.