Measure time between actuation of two push-buttons

Hi guys, I've built a circuit where I press two buttons at a certain interval. I want to measure the time interval. But it doesn't work for me and I get wrong values. Can someone tell me what I'm doing wrong and help me?

here my circuit: Circuit design Cool Curcan | Tinkercad

here my code:

int buttonState1 = 0;
int buttonState2 = 0;
unsigned int long start;
unsigned int long ende;
unsigned int long dauer;
int condition = 0;
void setup()
{
  pinMode(2, INPUT);
  pinMode(13, OUTPUT);
  pinMode(3, INPUT);
  pinMode(12, OUTPUT);
  Serial.begin(9600);
  Serial.println("Zeit");
 
}

void loop()
{
  while(digitalRead(2)==condition){
	
    start = millis();}
  	
  
  while(digitalRead(3)==condition){
	
    	ende=millis();
    
    dauer = ende - start;}	
  		
  	Serial.println(dauer);
}

It would be better to detect when the inputs become equal to the condition, not when they are equal to the condition. See the StateChangeDetection example in the IDE

How are the inputs wired ?
Do you have pullup or pulldown resistors in place to keep them in a known state at all times ?

Got this far.

unsigned int long start;
unsigned int long ende;
unsigned int long dauer;

Why are they defined as both int and long?

unsigned int long
Should be:
unsigned long

Don’t use ‘while’.

Do you ‘fully’ understand these examples?