Measure the duration of a low or high signal - Wokwi ESP32, STM32, Arduino Simulator