Calibrating Heidenhain encoder with arduino

for measuring time between pulses I have used both a Due and an ESP32
for example, see read-time-between-rise-on-3-separate-input-pins