Airsoft Chronograph - DIY Code asistance

Hi, first of all please excuse my poor english.

I am trying to build a chronograph with 2 IR led emitters and 2 phototransistors ( BPW17 ).
The two sensors are 20cm apart and it’s pretty hard to get both of them triggered when i shoot an airsoft replica. But when i do get them triggered i’m not sure if my code is correct (actually i inspired from other projects around and tryed to understand as better as i could the timer and port manipulation) also i’m not sure my math is correct.

So if anyone has any spare time and could look at my code and check if i’m correct please advice (the thing is i’m getting some weird results, once i get 0.10m/s and once i get like 90m/s, i am not sure also how fast my airsoft replica it is, this is why i’m building a chrono in the first place :P)

so here it is the code :

/*   - Chrono Test Run  -
 - 17.08.2014       -
 
 */

// Liquid Crystal Library
#include <LiquidCrystal.h>

//initialize the library RS, E, D4, D5, D6, D7) - attiny84 pins A0 , A1 , A3, A2, A5 ,A4)
LiquidCrystal lcd(0, 1, 3, 2, 5, 4);


volatile unsigned int overflows = 0;  //pt timer 1 overflows
unsigned int temp_timer = 0;
volatile unsigned long time;

void setup() {
  // setup lcd number of col and rows
  lcd.begin(16, 2);
  // print program details
  lcd.setCursor(0, 0);
  lcd.print("Chrono 4 Airsoft");
  lcd.setCursor(0, 1);
  lcd.print("ver 0.1");
  delay(1500);
  lcd.clear();
  //set pin on attiny84 A0-A5 as outpus (for LCD) and A6 & A7 input for pus button and second sensor)
  DDRA = B00011111;
  // set pin as input for first sensor
  pinMode(8, INPUT);
  //DDRB = DDRB | 0b00000100;

  //  TCCR1A = 0;// set entire TCCR1A register to 0
  TIMSK1 = _BV(TOIE1);  //enalbe interrupt
  //TCCR1B = 0;// set timer 1 to 0
  TCCR1B |= (1 << CS10); // set timer 1 to 0
  TCCR1C = 0; // set timer 2 to 0

}

void loop() {

  // pin PB2 - pin 5
  //while(!(PINB & 0b100));//wait for input on sensor 1 - when triggered = 1
  while(!(PINB & 0b100))
    TCNT1 = 0;    //set the counter to 0, just in case  
  TCCR1B = 1;// start timer 1

    // pin PA7 - pin 6
  while(!(PINA & 0b10000000));//wait for iput on sensor 2 -  when triggered = 1
  //cli();  // #define noInterrupts / sei() #define interrupts
  temp_timer = TCNT1;  //store passed ticks

  time = (((unsigned long)overflows - 1ul) << 16) | (unsigned long)temp_timer - 4;      //calculate time

  // calculate speed = (distance / (time * t_period/clock tick)) 
  // clock period/tick = 1/F_CPU ( ex : 1/16000000 pt 16mhz = 0.0000000625)  (ex : 1/2000000 pt 20mhz = 0.00000005)

  float xspeed = (20 / (time * 0.00000005));

  lcd.setCursor(0, 0);
  lcd.print("Speed in M/s:");
  lcd.setCursor(0, 1);
  lcd.print(xspeed, 2);
  lcd.print("m/s");

  TCCR1B = 0x00;// stop timer 1
  overflows = 0; // resetam overflows

}

//ISR(TIMER1_OVF_vect)
ISR(TIM1_OVF_vect)
{
  overflows++;
}//end ISR

thanks a lot.