Is millis() the real-time value of the timer?
Can I treat it like a variable? Can I do this (or how would I do this):
======================
// this assumes pulsecounter automatically increments on rising edge of GPIO-22
targetc = 40 // define targetc to be the target count value
loop-here // a location in the code
pulsecounter = 0 // set pulsecounter to 0, the ESP32 automatically increments pulsecounter
while pulsecounter = 0
wend
// above while-wend loop is waiting for pulsecounter to equal 1
millis() = 0 // set hi-res counter to zero
while pulsecounter < targetc
period = millis()
wend
// above while-wend loop is waiting for pulsecounter to equal targetc + 1, period contains last timer value
rpm = 600000 / period // this assumes period has units of milli-seconds
// rpm can be (probably should be) integer variable, not real
print rpm
goto loop-here
=====================
The above is pseudo-code. How to code it for real?