How to time three events

Hi,

I am totally new to Arduino programming. Could someone please explain how to do following.

I want to read the code from ir receiver ( I have figured out this part) and if that code say is A , B or C. I want to record the time when was A, B and C occurred. Then compare these three times and pick the minimum time. Could you please guide me how to perform this?

There is literally thousands of code examples for the Arduino. I suggest you start with Google. Secondly, I also recommend reading up on some C/C++ basics. I would also look at The Blink Without Delay example in the IDE, I have a feeling you are going to need to implement that functionality.

I can say that no one will write the code for you here. But if you have a specific question regarding some issues you have while trying to write the code yourself, you can ask them here and I am sure that someone will help you.

arifjahangir:
Then compare these three times and pick the minimum time. Could you please guide me how to perform this?

I'm a little confused. The "minimum time" ??? The minimum time since what ? Since the day started ? Since the Arduino booted ? Since the formation of the Earth ? If you mean which IR message/code arrived first, then you already can determine this, no need to record the "time" of each message. Just have 3 variables, lets call them *First, Second* and *Last*. When the 1'st message, be it A, B or C is decoded put the corresponding character into *First*; that is an "A", "B" or "C" into *First*. Do likewise for the 2'nd and 3'rd messages received into *Second* and *Last*. Yes ?

Or do you mean that the IR messages contain some sort of time code ? And you want to examine the contents of each message to see which has some lower time ? If so, you need to specify how time is encoded into each message before anyone can offer any advice on that.