Sure - but the outputs will change within microseconds of the button pushes.
use this:
unsigned long startTime = micros();
and then
unsigned long endTime = micros();
and do the math
unsigned long elapsedTime = endTime - startTime; // in microseconds