rpm sensing with proximity sensor

dear all,

i have changed the code a little. the idea is now to measure the time between 2 pulses (1 bolt passes the sensr twice, thus 1 full rotation of the axis) and calculate the rpm. measurements happens in microseconds.

const byte interruptPin = 2;
volatile byte state = LOW;
float n=0;
float RPM = 0;
unsigned long previoustime = 0;


void setup() {
  Serial.begin(9600);
  pinMode(LED_BUILTIN, OUTPUT);
  pinMode(interruptPin, INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(interruptPin), blink, FALLING);
  /* CHANGE to trigger the interrupt whenever the pin changes value
      LOW to trigger the interrupt whenever the pin is low,
      RISING to trigger when the pin goes from low to high,
      FALLING for when the pin goes from high to low.The Due, Zero and MKR1000 boards allows also:
      HIGH to trigger the interrupt whenever the pin is high.
  */


}
void loop() {

  digitalWrite(LED_BUILTIN, state);
}


void blink() {
  state = !state;
  if (digitalRead(LED_BUILTIN  == FALLING))
  {n++;
  }
  Serial.print("number of detections : ");
  Serial.print(n);
  
  if (n == 2){
     unsigned long currenttime = micros();
     RPM = (((float) 1.00 / (float)(currenttime - previoustime)) * (float) 60000000.00);
     currenttime = previoustime;
     n=0;
  }
      
    Serial.print("         RPM :   ");
    Serial.println(RPM);

  }

but what happens in serial monitor is that the rpm value keeps dropping till reaches zero.But motor speed is constant.

help please.