Method for optical distance measuring, wherein within a first measuring interval a first plurality of measuring pulses is transmitted by means of a transmitting element of a transmitting unit at first transmission times, wherein within a second measuring interval a second plurality of measuring pulses is transmitted by means of the transmitting element of the transmitting unit at second transmission times, wherein the method comprises receiving reflected measuring pulses by means of a receiving element of a receiving unit assigned to the transmitting element at reception times, characterized in that the method comprises determining a first set of transit times for each received measuring pulse, wherein the first set of transit times is determined using the first transmission times, wherein the method comprises determining a second set of transit times for each received measuring pulse, wherein the second set of transit times is determined using the second transmission times, wherein the first set of transit times is determined using the first transmission times by subtracting each first transmission time from the reception time of the respective received measuring pulse, wherein the second set of transit times is determined using the second transmission times by subtracting each second transmission time from the reception time of the respective received measuring pulse, wherein the first measuring interval and the second measuring interval follow each other directly in time, wherein the method comprises generating at least one histogram for the receiving element and entering the first set and/or the second set of transit times into the histogram. wherein within a first measuring interval a first plurality of measuring pulses is transmitted by means of a transmitting element of a transmitting unit at first transmission times, wherein within a second measuring interval a second plurality of measuring pulses is transmitted by means of the transmitting element of the transmitting unit at second transmission times, wherein the method comprises receiving reflected measuring pulses by means of a receiving element of a receiving unit assigned to the transmitting element at reception times, characterized in that the method comprises determining a first set of transit times for each received measuring pulse, wherein the first set of transit times is determined using the first transmission times, wherein the method comprises determining a second set of transit times for each received measuring pulse, wherein the second set of transit times is determined using the second transmission times, wherein the first set of transit times is determined using the first transmission times by subtracting each first transmission time from the reception time of the respective received measuring pulse, wherein the second set of transit times is determined using the second transmission times by subtracting each second transmission time from the reception time of the respective received measuring pulse, wherein the first measuring interval and the second measuring interval follow each other directly in time, wherein the method comprises generating at least one histogram for the receiving element and entering the first set and/or the second set of transit times into the histogram.