Abstract: An inexpensive and reliable, high resolution digital phase detector for timing circuits for wireless, optical or wire-line transmission systems. In particular this invention allows using size limited clock counters for measurements of unlimited time ranges by combining unlimited number of intermediate samples without accumulating samples granularity errors. In addition to the measurements of the final time ranges, the intermediate samples are available for purposes of digital signal processing.