Slow reaction from Ultrasonic reading

I’m just having slight difficulty trying to increase the response time of my ultrasonic sensor.
It’s the generic one used on many arduino projects

Arduino Ultrasonic Module HC-SR04 Distance Sensor

I’ve gotten it down pretty good with the coding however, I am experiencing some difficulty with my if else statement for when an object is detected.

any errors you see?

// Skeleton Code designed by Markus Proctor
// Allows up to 4 dc motors to be controlled at once!
// <AFmotor.h is the library used

int Val;
#include <AFMotor.h>
#include <Ultrasonic.h>

#define TRIGGER_PIN 12

#define ECHO_PIN 13

Ultrasonic ultrasonic (TRIGGER_PIN, ECHO_PIN);
#include <Servo.h> 
Servo servoLeft;          // Define left servo
Servo myservo;         // Define right servo

AF_DCMotor motor1(1, MOTOR12_64KHZ);
AF_DCMotor motor2(2, MOTOR12_64KHZ);
AF_DCMotor motor3(3, MOTOR12_64KHZ);
AF_DCMotor motor4(4, MOTOR12_64KHZ);// create motor #2, 64KHz pwm

void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Motor test!");
  
// myservo.attach(9);
  motor1.setSpeed(150);    
  motor2.setSpeed(150);
  motor3.setSpeed(255);
  motor4.setSpeed(255); // set the speed to 200/255
  
}

void loop() 
{
  Sensor ();


}
  
  
/*motor1.run(BACKWARD); 
motor2.run(BACKWARD);
delay(2000);
motor1.run(RELEASE); 
motor2.run(RELEASE);
delay(500);
motor1.run(FORWARD); 
motor2.run(BACKWARD);
delay(500);
 myservo.attach(9);
myservo.write(10);    
delay(1500);
myservo.write(85);// tell servo to go to position in variable 'pos' 
delay(500);
myservo.detach();

}
*/



void Sensor ()
{float cmMsec;

long microsec = ultrasonic.timing();

cmMsec = ultrasonic.convert (microsec, Ultrasonic::CM);

{if (cmMsec > 20)
{

motor1.run(BACKWARD); 
motor2.run(BACKWARD);
delay(2000);
}
else
{
  motor1.run(RELEASE); 
 motor2.run(RELEASE);
motor1.run(FORWARD); 
motor2.run(BACKWARD);
delay(500);
}}
}

arduino duemilanove
Tetrix gear motors

Use of delay is going to make your system unresponsive. The usual advice in this situation is for you to look at the blink without delay example and to search the forums for threads on state machines.