An electronic circuit includes a transimpedance amplifier, a bypass circuit that allows a part of an input signal to be applied to the transimpedance amplifier to flow through the bypass circuit so as to bypass the transimpedance amplifier on the basis of a control signal, and a control signal circuit that includes a hold circuit having a time constant that is variable on the basis of a time constant control signal and generates the control signal.