How to do simple float calculations in a interrupt handler on NodeMCU ESP32

I think the reason floats are used is for precision. The calculation needs to check if it is below 1 second, so it is dealing with microseconds. I have figured out another way to do it though so it's working so far! Appreciate the information from you, I've been reading the documentation a lot more now.