I need help with writing software that checks time difference

Hello I need help with writing software that checks time difference between two clocks with a square wave at the entrance.
My idea is, when the first clock RISING. Need to interrupt timer starts.
And when comes the second wave RISING to stop the timer.
My software should check with the standard under 800 microseconds green LED lights up. In the second case over 800 micro seconds red LED lights.

I would appreciate your help

What kind of clocks output such a signal?

Have you connected the output pins to the external interrupts pins on the Arduino? Have you called attachInterrupt() to define what function to call, under what circumstances?

In the callback method, have you recorded,using millis() or micros() when the event happened?

Surely, you don't need help with subtracting one time from another.

1.these two signals square waves that come from various units.
2.I have no experience writing software.What you wrote down about the software its exactly what I need.
3."Have you connected the output pins to the external interrupts pins on the Arduino"=YES I DO
4.PLEASE WRITE ME SOFTWARE its only about 10-15 lines.

raz_livman:
4.PLEASE WRITE ME SOFTWARE its only about 10-15 lines.

These forums are really about helping you to develop your project, not doing it for you. If you want somebody to do it with/for you you could ask for help in the Gigs and Collaborations section. Note that most people would expect to be paid for working for you.

check attachInterrupt() - Arduino Reference

partial code to get started. this clocks the start time,

int pin = 13;
volatile int state = LOW;
volatile unsigned long start = 0;
volatile unsigned long stop = 0;

void setup()
{
  pinMode(pin, OUTPUT);
  attachInterrupt(0, set1, RISING); 
}

void loop()
{
   digitalWrite(13, state);
}

void set1()
{
  start = micros();
}