Arduino-Time relay

Hello, I trying to make time relay with arduino and small module display (each number with 7 modules, 2 numbers ).I using delay (1 sec) and each time it make ~ 7700 loops to make 1 min , but each time it time can be from 55 sec to 1 min and 5 sec . Is here any ways to decreased this mismatch of time, 1-2 sec is not problem, but 10 :frowning: .
Sorry for my bad English.

Always show us your current compete sketch. Use CTRL T to format the sketch. Please use code tags. Use the </> icon in the posting menu.
[code] Paste sketch here. [/code]

I am new in the programing and my code is very very bad, sory :frowning: .

 #include <EEPROM.h>

const int buttonPin1 = 9;
const int buttonPin2 = 11;
const int buttonPin3 = 12;


int buttonState1 = 0;   
int buttonState2 = 0;   
int buttonState3 = 0;   



bool T = false;
bool T1 = false;
bool T3 = false;
bool T4 = false;
bool T5 = false;


bool plus = true;
bool minus = true;



int analogPin1 = 6;
int val1 = 0; 
int analogPin2 = 7;
int val2 = 0; 

const int ledPin2 =  2;  
const int ledPin3 =  3; 
const int ledPin4 =  4; 
const int ledPin5 =  5; 
const int ledPin6 =  6; 
const int ledPin7 =  7; 
const int ledPin8 =  8; 
const int ledPin9 =  10; 

const int ledPin13 =  13; 
const int ledPin14 =  14; 
const int ledPin15 =  15; 
const int ledPin16 =  16; 
const int ledPin17 =  17; 
const int ledPin18 =  18; 
const int ledPin19 =  19; 

int save = 0;
int save1 = 0;
int save2 = 0;
bool SAVE = false ;

  


   int n = 0;
   int m = 0; 
   int b = 0;
   int s = 0;
   int d = 10;

    int g = 0;

void setup() {
  Serial.begin(9600);


   pinMode(buttonPin1, INPUT);
   pinMode(buttonPin2, INPUT);
   pinMode(buttonPin3, INPUT);
     
  
  pinMode(ledPin2, OUTPUT);
  pinMode(ledPin3, OUTPUT);
  pinMode(ledPin4, OUTPUT);
  pinMode(ledPin5, OUTPUT);
  pinMode(ledPin6, OUTPUT);
  pinMode(ledPin7, OUTPUT);
  pinMode(ledPin8, OUTPUT);
  pinMode(ledPin9, OUTPUT);




  pinMode(ledPin13, OUTPUT);
  pinMode(ledPin14, OUTPUT);
  pinMode(ledPin15, OUTPUT);
  pinMode(ledPin16, OUTPUT);
  pinMode(ledPin17, OUTPUT);
  pinMode(ledPin18, OUTPUT);
  pinMode(ledPin19, OUTPUT);

 
  

}

void loop() {


  val1 = analogRead(analogPin1);
    Serial.println(val1);
     val2 = analogRead(analogPin2);
    Serial.println(val2);
  
   
   buttonState3 = digitalRead(buttonPin3);


//SAVESAVESAVESAVESAVEASAVEAS
 if (buttonState2 == HIGH)
 {T4 = true;}
 else
 {T4 = false;}

    if (buttonState3 == HIGH)
    {
   SAVE = true;
save = EEPROM[ 0 ]; 
 if (T5 == false)
 {save1 = save;}

    }
    else 
    {
      if(T5 == true)
      {T5 == false;
       EEPROM[ 0 ] = save1;
  
        }
      SAVE = false; 
    
   
    }

if (buttonState3 == HIGH && buttonState2 == HIGH)
{
  n = EEPROM[ 0 ];
  T = false; 
}




if (SAVE == false)
  {
if (minus == true)
{
    if (val1 > 820)
    {minus = false;
      
      if (n > 0 )
    {n--;}
    
 }
}
 if (val1 < 200)
 {minus = true;}

if (plus == true)
{
 if (val2 > 820)
 {plus = false;
  if (n < 99)
 {n++;
 }
 }
}
if (val2 < 200)
{plus = true;}
  }

    
  else
  {

   
    
if (minus == true)
{
    if (val1 > 820)
    {minus = false;
   g = EEPROM[ 0 ];
      if (g > 0 )
    {T5 = true;
      save1--;
    
      }
    
 }
}
 if (val1 < 200)
 {minus = true;}

if (plus == true)
{
 if (val2 > 820)
 {plus = false;
 g = EEPROM[ 0 ];
  if (g < 99)
 {save1++;

 T5= true;}
 }
}
if (val2 < 200)
{plus = true;}
    
    }
   buttonState1 = digitalRead(buttonPin1);
  buttonState2 = digitalRead(buttonPin2);

 


 
 
    digitalWrite(ledPin2, LOW);
    digitalWrite(ledPin3, LOW);
    digitalWrite(ledPin4, LOW);
    digitalWrite(ledPin5, LOW);
    digitalWrite(ledPin6, LOW);
    digitalWrite(ledPin7, LOW);
    digitalWrite(ledPin8, LOW);
    digitalWrite(ledPin9, LOW);
    digitalWrite(ledPin14, LOW);
    digitalWrite(ledPin15, LOW);
    digitalWrite(ledPin16, LOW);
    digitalWrite(ledPin17, LOW);
    digitalWrite(ledPin18, LOW);
    digitalWrite(ledPin19, LOW);

  
if (SAVE == false)
{
 m = n/10;
b = n-m*10;
}

else
{ save2 =  save1; 
  
  m =save2 /10;
b = save2-m*10;
  }
if (T == false )
{d = 10;

}

if (d >= 30)
{d = 0;}

if (d <5)
  {}
  else{
  if (b == 0 )
{ 
  
  digitalWrite(ledPin7, HIGH);
    digitalWrite(ledPin15, HIGH);
    digitalWrite(ledPin14, HIGH);
    digitalWrite(ledPin16, HIGH);
    digitalWrite(ledPin6, HIGH);
    digitalWrite(ledPin8, HIGH);
 
  
 
}


    else if (b == 1)
    { 
      
      digitalWrite(ledPin6, HIGH);
    digitalWrite(ledPin14, HIGH);
    
   

    }


 else if  (b == 2)
    {

      
    digitalWrite(ledPin9, HIGH);
    digitalWrite(ledPin15, HIGH);
    digitalWrite(ledPin16, HIGH);
    digitalWrite(ledPin8, HIGH);
    digitalWrite(ledPin6, HIGH);
   
   
      
      }

      else if (b == 3)
      {
    digitalWrite(ledPin8, HIGH);
    digitalWrite(ledPin14, HIGH);
    digitalWrite(ledPin16, HIGH);
    digitalWrite(ledPin9, HIGH);
    digitalWrite(ledPin6, HIGH);
  
    
        
      }

      else if (b == 4)

      { 
    digitalWrite(ledPin7, HIGH);
    digitalWrite(ledPin9, HIGH);
    digitalWrite(ledPin6, HIGH);
    digitalWrite(ledPin14, HIGH);
   
   
  
          
    }

    else if (b == 5)

     {
    digitalWrite(ledPin8, HIGH);
    digitalWrite(ledPin7, HIGH);
    digitalWrite(ledPin9, HIGH);
    digitalWrite(ledPin14, HIGH);
    digitalWrite(ledPin16, HIGH);
   
    
      
      }
      else if (b == 6)
{ 
  digitalWrite(ledPin9, HIGH);
    digitalWrite(ledPin7, HIGH);
    digitalWrite(ledPin8, HIGH);
    digitalWrite(ledPin15, HIGH);
    digitalWrite(ledPin14, HIGH);
    digitalWrite(ledPin16, HIGH);
 
 
   

  
  }
else if (b == 7)
{
  digitalWrite(ledPin8, HIGH);
    digitalWrite(ledPin6, HIGH);
    digitalWrite(ledPin14, HIGH);
   
 
  
          
}

else if (b == 8)

{ digitalWrite(ledPin16, HIGH);
    digitalWrite(ledPin15, HIGH);
    digitalWrite(ledPin14, HIGH);
    digitalWrite(ledPin9, HIGH);
    digitalWrite(ledPin6, HIGH);
    digitalWrite(ledPin8, HIGH);
     digitalWrite(ledPin7, HIGH);
 
  
}

 else if (b == 9)
 {
   digitalWrite(ledPin8, HIGH);
    digitalWrite(ledPin7, HIGH);
    digitalWrite(ledPin6, HIGH);
    digitalWrite(ledPin14, HIGH);
    digitalWrite(ledPin16, HIGH);
    digitalWrite(ledPin9, HIGH);
 
 
 
}





     if (m == 1)
    { digitalWrite(ledPin5, HIGH);
    digitalWrite(ledPin19, HIGH);
    



    }


 else if  (m == 2)
    {
    digitalWrite(ledPin2, HIGH);
    digitalWrite(ledPin18, HIGH);
    digitalWrite(ledPin17, HIGH);
    digitalWrite(ledPin3, HIGH);
    digitalWrite(ledPin5, HIGH);
   
  
      
      }

      else if (m == 3)
      {
    digitalWrite(ledPin3, HIGH);
    digitalWrite(ledPin19, HIGH);
    digitalWrite(ledPin17, HIGH);
    digitalWrite(ledPin2, HIGH);
    digitalWrite(ledPin5, HIGH);
  
    
        
      }

      else if (m == 4)

      { 
    digitalWrite(ledPin4, HIGH);
    digitalWrite(ledPin2, HIGH);
    digitalWrite(ledPin5, HIGH);
    digitalWrite(ledPin19, HIGH);
   
   
   
          
    }

    else if (m == 5)

     {
    digitalWrite(ledPin4, HIGH);
    digitalWrite(ledPin3, HIGH);
    digitalWrite(ledPin2, HIGH);
    digitalWrite(ledPin19, HIGH);
    digitalWrite(ledPin17, HIGH);
   
   
      
      }
      else if (m == 6)
{ 
  digitalWrite(ledPin2, HIGH);
    digitalWrite(ledPin3, HIGH);
    digitalWrite(ledPin4, HIGH);
    digitalWrite(ledPin18, HIGH);
    digitalWrite(ledPin19, HIGH);
    digitalWrite(ledPin17, HIGH);
 
  
  }
else if (m == 7)
{
  digitalWrite(ledPin3, HIGH);
    digitalWrite(ledPin5, HIGH);
    digitalWrite(ledPin19, HIGH);
   
 
 
          
}

else if (m == 8)

{ digitalWrite(ledPin17, HIGH);
    digitalWrite(ledPin18, HIGH);
    digitalWrite(ledPin19, HIGH);
    digitalWrite(ledPin2, HIGH);
    digitalWrite(ledPin5, HIGH);
    digitalWrite(ledPin4, HIGH);
     digitalWrite(ledPin3, HIGH);
 
 
}

 else if (m == 9)
 {
   digitalWrite(ledPin4, HIGH);
    digitalWrite(ledPin3, HIGH);
    digitalWrite(ledPin5, HIGH);
    digitalWrite(ledPin19, HIGH);
    digitalWrite(ledPin17, HIGH);
    digitalWrite(ledPin2, HIGH);
 
 
 }
  }


 if (buttonState1 == LOW)
{  





 if (buttonState2 == HIGH && T == false && T1 == false && buttonState3 == LOW && T4 == false)
{
  if (n != 0 )
{
  T = true;
T1 = true;


}
}
if ( buttonState2 == HIGH && T3 == true && T1 == false)
{T = false;
T1 = true;} 

if(buttonState2 == LOW)
{
T1 = false;

}


if (n == 0)
{
T = false;
}





 if (T == true && n > 0)
{digitalWrite(ledPin13, HIGH);

    T3 = true;

 
   delay(1);
   d++;
   
s++;
  

 if(s >= 7320)
  {
   n--;
if (n == 0)
{T = false;
T1 = true;


}
s=0;       
}
}
else {digitalWrite(ledPin13, LOW);
;
T3 = false;}


}
else
{
 digitalWrite(ledPin13, LOW);
 d = 10;
 

}

"very very bad, sory :frowning: . "
No arguments there 8)

No comments, single letter variables, poor formatting and all that code and now you are having problems.

I would like to help, but I would have to be a mind reader.
Hopefully someone with lots of time can help you.

Show us a good schematic of your circuit. Show us a good image of your wiring.

.