An ophthalmic apparatus comprising: a light source of wavelength sweeping type; a measurement optical system configured to irradiate a subject eye with light from the light source and to guide reflected light from the subject eye ; a reference optical system configured to guide the light from the light source so as to use the light from the light source as reference light; a light receiving element configured to receive interference light, the interference light being a combination of the reflected light from the subject eye and the reference light; a sample clock signal generator configured to generate a sample clock signal from the light from the light source , the sample clock signal cyclically changing at equal frequency intervals; a signal processor configured to sample an interference signal based on the sample clock signal outputted from the sample clock signal generator , the interference signal being outputted from the light receiving element when the light receiving element receives the interference light; a sample clock sampling circuit configured to sample the sample clock signal outputted from the sample clock signal generator ; a processor ; and a memory storing computer-readable instructions therein, wherein the computer-readable instructions, when executed by the processor , cause the ophthalmic apparatus to: generate period data based on the sample clock signal sampled at the sample clock sampling circuit , the period data indicating a relationship between a period of the sample clock signal and time; and determine a processing duration of the interference signal sampled at the signal processor based on the period data. a light source of wavelength sweeping type; a measurement optical system configured to irradiate a subject eye with light from the light source and to guide reflected light from the subject eye ; a reference optical system configured to guide the light from the light source so as to use the light from the light source as reference light; a light receiving element configured to receive interference light, the interference light being a combination of the reflected light from the subject eye and the reference light; a sample clock signal generator configured to generate a sample clock signal from the light from the light source , the sample clock signal cyclically changing at equal frequency intervals; a signal processor configured to sample an interference signal based on the sample clock signal outputted from the sample clock signal generator , the interference signal being outputted from the light receiving element when the light receiving element receives the interference light; a sample clock sampling circuit configured to sample the sample clock signal outputted from the sample clock signal generator ; a processor ; and a memory storing computer-readable instructions therein, wherein the computer-readable instructions, when executed by the processor , cause the ophthalmic apparatus to: generate period data based on the sample clock signal sampled at the sample clock sampling circuit , the period data indicating a relationship between a period of the sample clock signal and time; and determine a processing duration of the interference signal sampled at the signal processor based on the period data. generate period data based on the sample clock signal sampled at the sample clock sampling circuit , the period data indicating a relationship between a period of the sample clock signal and time; and determine a processing duration of the interference signal sampled at the signal processor based on the period data. <EOS>