Hi, Picmen

Being a little mocking, I would point out this kind of measure is based on DIGITAL inputs and not Analogic swinging voltages ...

The answer is here: you want to measure something, but don't really know what !!!

If you use a calibrated PAUSE, from the first detection, say 20ms ( i.e.) not to deal with bouncing and use a RCTime command just after, you just will have to add the PAUSE time to your result ...
The Button command could also be taken for that ... as debouncing time is known. of course always followed by a RCTime.

Those are just little ideas ...

Alain