Timer Counter on ESP32
To get timer counter on ESP32
Circuit
Circuit image