Chronometer for modelism project !

Hi all

I want to be helped please, my project is a track where is a chronometer start when a captor detect the vehicle at the beginning and stop when it arrive !

So i have made the track etc.. but i want the display to show directly via 4 digits 7 seg the time in millis, i need a help just for the part of the digit : i don't know how display the number wanted at the right place. I just want to learn how display the good number when i press the '7' for example.. After for the rest i think i try alone but a help is not rejected !!

If you can help me please ! 8)

Perhaps this example will help. Segments are connected to pins 5 through 12. Digits are connected to pins 14, 2, 3, and 4.

// Digit select lines, right to left
#define DIGIT4 14Â  // LSD
#define DIGIT3 2
#define DIGIT2 3
#define DIGIT1 4Â  // MSD

// Bit maps for the seven segment display
const unsigned char Segments[] =
{
Â  0b11000000, // 0
Â  0b11001111, // 1
Â  0b10100100, // 2
Â  0b10000110, // 3
Â  0b10001011, // 4
Â  0b10010010, // 5
Â  0b10010000, // 6
Â  0b11000111, // 7
Â  0b10000000, // 8
Â  0b10000011, // 9
};

// List of digit select lines, least significant digit first
const unsigned char Digits[4] = {
Â  DIGIT4, DIGIT3, DIGIT2, DIGIT1};

void setup()
{
Â  for (int i=2; i<15; i++)
Â  {
Â  Â  pinMode(i,OUTPUT);
Â  Â  digitalWrite(i,LOW);
Â  }
Â  digitalWrite(12, HIGH);
Â  digitalWrite(13, HIGH);
}

void loop()
{
Â  // Get time since last reset
Â  int clock;

////////Â  Set 'clock' to the 4-digit integer to be displayed

Â  // Display each digit, right to left
Â  for (int i=0; i<4; i++)
Â  {
Â  Â
Â  Â  // Peel a digit off the low end of the number
Â  Â  int digit = clock % 10;
Â  Â  clock /= 10;
Â  Â
Â  Â  // Blank the MSD if it is zero
Â  Â  if (i==3 && digit == 0)
Â  Â  {
Â  Â  Â  for (int s=5; s<12; s++)
Â  Â  Â  Â  digitalWrite(s,HIGH);
Â  Â  }
Â  Â  else
Â  Â  {
Â  Â  Â  // Display the digit on the seven segments
Â  Â  Â  unsigned char segments = Segments[digit];
Â  Â  Â  for (int s=5; s<12; s++)
Â  Â  Â  {
Â  Â  Â  Â  digitalWrite(s,segments & 1);
Â  Â  Â  Â  segments >>= 1;
Â  Â  Â  }
Â  Â  }

Â  Â  // Turn on the digit briefly
Â  Â  digitalWrite(Digits[i], HIGH);Â  // Select one digit
Â  Â  delay(3);
Â  Â  digitalWrite(Digits[i], LOW);
Â  }
}

thanks a lot