arduino uno not reading the pulse

hello , i am using arduino uno to delay pulses that comes from the zero crossing detector to have a triggering angle , i have used the program below it worked for 1ms pulse width (from signal generator )
but it didn’t work for the 0.4 ms pulse width (from my zero crossing detector circuit )

i don’t know if the problem from the width or another thing , please help me

int AC_pin = 10;//Pin to OptoTriac
byte dim = 0; //Initial brightness level from 0 to 255, change as you like!

void setup() {
Serial.begin(9600);
pinMode(AC_pin, OUTPUT);
attachInterrupt(0, light, FALLING);//When arduino Pin 2 is FALLING from HIGH to LOW, run light procedure!
}

void light() {
if (Serial.available()) {
dim = Serial.read();
if (dim < 1) {
//Turn TRIAC completely OFF if dim is 0
digitalWrite(AC_pin, LOW);
}

if (dim > 254) { //Turn TRIAC completely ON if dim is 255
digitalWrite(AC_pin, HIGH);
}
}

if (dim > 0 && dim < 255) {
//Dimming part, if dim is not 0 and not 255
delayMicroseconds(34*(255-dim));
digitalWrite(AC_pin, HIGH);
delayMicroseconds(500);
digitalWrite(AC_pin, LOW);
}
}
void loop() {
}

but it didn't work for the 0.4 ms pulse width (from my zero crossing detector circuit )

Which you are not bothering to tell us about. Code without knowing about the hardware is useless.