Coding Two LEDs and Potentiometer with cut off time on

OK, so you apparently realise it is pointless using floating point here, you just need to determine the integer value corresponding to your chosen thresholds.

You need to practice the art of timing things. You need to study this tutorial and this.