A surveying instrument including a distance measuring device for measuring a distance to a target from said distance measuring device, wherein said distance measuring device comprises: a processing unit adapted to determine the distance to the target from said distance measuring device on the basis of a comparison between a transmitted optical pulse and a received optical pulse; and an optical device, including: an optical radiation source adapted to emit optical pulses; a receiver unit adapted to receive reflected optical pulses; a time-measuring unit adapted to generate an elapsed time from a predetermined point in time; at least one control signal generator unit (5a, 5b, 5c); and a control unit; wherein the control unit is adapted to: cause the at least one control signal generator unit to generate at least one control signal according to a predetermined temporal function on the basis of the elapsed time; and on the basis of the generated at least one control signal, adjust at least one parameter of said receiver unit during a travel time of an optical pulse from the optical device to a target and back, wherein said at least one parameter affects the dynamic range of said receiver unit, characterized in that the predetermined temporal function is configured such that it at least partly comprises a shape that is determined on the basis of different parameters of an optical system comprised in the optical device, said optical system being configured to direct a portion of the reflected optical pulses towards the receiver unit; and wherein the temporal dependence of said at least one parameter of the receiver unit, which is the optical sensitivity of the receiver unit, is calibrated during or after manufacturing of the optical device a processing unit adapted to determine the distance to the target from said distance measuring device on the basis of a comparison between a transmitted optical pulse and a received optical pulse; and an optical device, including: an optical radiation source adapted to emit optical pulses; a receiver unit adapted to receive reflected optical pulses; a time-measuring unit adapted to generate an elapsed time from a predetermined point in time; at least one control signal generator unit (5a, 5b, 5c); and a control unit; wherein the control unit is adapted to: cause the at least one control signal generator unit to generate at least one control signal according to a predetermined temporal function on the basis of the elapsed time; and on the basis of the generated at least one control signal, adjust at least one parameter of said receiver unit during a travel time of an optical pulse from the optical device to a target and back, wherein said at least one parameter affects the dynamic range of said receiver unit, characterized in that the predetermined temporal function is configured such that it at least partly comprises a shape that is determined on the basis of different parameters of an optical system comprised in the optical device, said optical system being configured to direct a portion of the reflected optical pulses towards the receiver unit; and wherein the temporal dependence of said at least one parameter of the receiver unit, which is the optical sensitivity of the receiver unit, is calibrated during or after manufacturing of the optical device an optical radiation source adapted to emit optical pulses; a receiver unit adapted to receive reflected optical pulses; a time-measuring unit adapted to generate an elapsed time from a predetermined point in time; at least one control signal generator unit (5a, 5b, 5c); and a control unit; wherein the control unit is adapted to: cause the at least one control signal generator unit to generate at least one control signal according to a predetermined temporal function on the basis of the elapsed time; and on the basis of the generated at least one control signal, adjust at least one parameter of said receiver unit during a travel time of an optical pulse from the optical device to a target and back, wherein said at least one parameter affects the dynamic range of said receiver unit, characterized in that the predetermined temporal function is configured such that it at least partly comprises a shape that is determined on the basis of different parameters of an optical system comprised in the optical device, said optical system being configured to direct a portion of the reflected optical pulses towards the receiver unit; and wherein the temporal dependence of said at least one parameter of the receiver unit, which is the optical sensitivity of the receiver unit, is calibrated during or after manufacturing of the optical device cause the at least one control signal generator unit to generate at least one control signal according to a predetermined temporal function on the basis of the elapsed time; and on the basis of the generated at least one control signal, adjust at least one parameter of said receiver unit during a travel time of an optical pulse from the optical device to a target and back, wherein said at least one parameter affects the dynamic range of said receiver unit, characterized in that the predetermined temporal function is configured such that it at least partly comprises a shape that is determined on the basis of different parameters of an optical system comprised in the optical device, said optical system being configured to direct a portion of the reflected optical pulses towards the receiver unit; and wherein the temporal dependence of said at least one parameter of the receiver unit, which is the optical sensitivity of the receiver unit, is calibrated during or after manufacturing of the optical device