How to turn on an LED light with my GPRS shield for a certain amount of seconds?

How are you everyone? Im currently using an arduino uno R3 and a seed studio GPRS shield V2.0. I found the code online to light up an LED light by SMS messages. The code works completely fine, but now I need to find a way to modify the code to only light the led light for 3 seconds. Please assist me on where to add my delay. The code is shown below:

#include <SoftwareSerial.h>

char inchar; // Will hold the incoming character from the GSM shield
SoftwareSerial SIM900(7, 8);

int led = 10;

void setup()
{
  Serial.begin(19200);
  // set up the digital pins to control
  pinMode(led, OUTPUT);
  digitalWrite(led, LOW);

  // wake up the GSM shield
  SIM900.begin(19200);
  delay(20000); // give time to log on to network.
  SIM900.print("AT+CMGF=1\r"); // set SMS mode to text
  delay(100);
  SIM900.print("AT+CNMI=2,2,0,0,0\r");
  // blurt out contents of new SMS upon receipt to the GSM shield's serial out
  delay(100);
  Serial.println("Ready...");
}

void loop()
{
  //If a character comes in from the cellular module...
  if(SIM900.available() >0)
  {
    inchar=SIM900.read();
    if (inchar=='#')
    {
      delay(10);

      inchar=SIM900.read();
      if (inchar=='a')
      {
        delay(10);
        inchar=SIM900.read();
        if (inchar=='0')
        {
          digitalWrite(led, LOW);
        }
        else if (inchar=='1')
        {
          digitalWrite(led, HIGH);
        }
        delay(10);
        SIM900.println("AT+CMGD=1,4"); // delete all SMS
      }
    }
  }
}

Since you don't seem to be concerned about time, or proper reading of data from the modem, turning the LED off after three seconds is going to be quite easy:

        else if (inchar=='1')
        {
          digitalWrite(led, HIGH);
          delay(3000); // Stick your head in the sand for a while
          digitalWrite(led, LOW); // turn the LED off
        }