Initializing multiple timers within the draw loop ()

not sure what your goal is

here we start from 0 using timer1, so the block moves every 1,1 seconds


int xPos = 0;
int timer1 ;

void setup() { 
  size(400, 400);
  noStroke();
} 

void draw() { 
  background(220);

  fill(255, 200, 40);
  rect(xPos, 30, 40, 40);

  if (millis() - timer1 > 1100) {
    xPos+=10; 
    timer1=millis();
  }
}
//