I want to record the time when was A, B and C occurred.
unsigned long aEventTime, bEventTime, cEventTime;
void loop()
{
// Get IR code
if(code == A) // Whatever that means
aEventTime = millis();
// Repeat for B and C.
// Now, determining which event time is greater than 0 but smaller than the other two is easy
}