OK. So, you have no idea how to get the time that events occur. That's what the millis function is about. millis() - Arduino Reference
Some things you need to fix in your code. The pinMode statements go in the setup function. Pins are generally either input or output, and rarely change during the program. So, they are set in setup, which is executed once, not in loop, which is executed many, many times.
The if statements are missing a function call. I think you left out digitalRead and some parentheses.
You need to add some variables to hold the time that the button state changes occur. They are long ints:
unsigned long startTime;
unsigned long stopTime;
unsigned long elapsedTime;
These go before the setup function. You also want to keep tracked of whether both buttons have been pushed. The concept of elapsed time implies that one event occurred (the start button was pushed) and then another event occurred (the stop button was pushed). The elapsed time is computed only after both events occur. So, add:
boolean started = false;
boolean stopped = false;
These also go before the setup function.
Then, you need to handle the start button being pushed:
if(digitalRead(startPin) == HIGH) // The start button was pushed
{
started = true; // Note that the start button has been pushed
startTime = millis(); // Note when the button was pushed
}
This goes inside loop. Add a similar block for the stop button.
Then, you need to see if both buttons have been pushed.
if(started && stopped)
{
elasped = stopTime - startTime; // How long did that take?
Serial.print("Elapsed time, in milliseconds: ");
Serial.println(elapsed);
started = false; // Reset so starting and stopping can happen again
stopped = false;
}