Error on millis time

I have an error in the times of my code, it receives a value from 0 to 100 of the serial port, and then it converts to seconds, example: if the value is 25, it should be 15 seconds off and 45 seconds on but the times are not accurate , for this example it is 20 seconds off and 51 on and sometimes varies

#include "Wire.h"
int ledState = LOW; 
const int ledPin = 9;
unsigned long tempo = 0; // variável para tratar valores do millis()
int temporizador = 0; // variável de status
unsigned short int  timerx=0;
unsigned short int   timery=0;

void setup() {
  Serial.begin(115200);
   pinMode(ledPin, OUTPUT);
  
}
void loop() {
 unsigned long currentMillis = millis();
  while (Serial.available()) {
    int received= Serial.parseInt();
    Serial.println(received);
    
 timerx=(((received*60)/100)*1000);
  timery=(60000-timerx);
   
    if(received==0)
  {
    
    digitalWrite(ledPin, LOW);
   }
   
   
   if(received==100){
    digitalWrite(ledPin, HIGH);
   }
     

 if (temporizador == 0) {      
           digitalWrite(ledPin, HIGH);  
           temporizador = 1; 
           tempo = millis(); 
}
 
  if (millis() - tempo >= timery && temporizador == 1){  
                                                                                 
        digitalWrite(ledPin, LOW); 
        temporizador = 2; 
         tempo = millis();
}

  if (millis() - tempo >= timerx && temporizador == 2){  
         
           digitalWrite(ledPin, HIGH); 
           temporizador = 1; 
           tempo = millis();
           digitalWrite(ledPin, HIGH);  
}
 
 



 
  }
}

Use the More option to edit your first post to include *all *the code, all the stuff that usually appears above loop().

arduino quick edit modify.png

arduino quick edit modify.png

That is not a complete sketch. Please post the entire sketch so we can see how you have declared your variables.

The most glaring issue is that all of the code is contained within the while (Serial.available()) loop therefore unless serial data is available you will not be executing any of your LED timing or manipulation!

Please follow the advice on posting a programming question given in Read this before posting a programming question

In particular note the advice to Auto format code in the IDE and to use code tags when posting code here

check out the map function. very useful converting one range to another.