This paper presents an innovative method for measuring the time delay of ultrasonic waves. Pulse methods used in the previous studies was characterized by latency. The method of phase correlation, presented in this article is free from this disadvantages. Due to the phase encoding with the use of Walsh functions the presented method allows to obtain better precision than previous methods. The algorithm to measure delay of the reflected wave with the use of microprocessor ARM Cortex M4 linked to a PC has been worked out and tested. This method uses the signal from the ultrasonic probe to precisely determine the time delay, caused by the propagation in medium, possible. In order to verify the effectiveness of the method a part of the measuring system was implemented in LabVIEW. The presented method proved to be effective, as it is shown in presented simulation results.