"#include includes.h" doesn't sound particularly useful!
I haven't followed the code, as plain text it loses its formatting which makes it difficult to read. You should post it here and wrap it in CODE tags to retain its original appearance.
The principle though is:
1. set up a timer with count rate fast enough for the timing resolution you need.
2. wait for the start output from the first comparator
3. either start the timer (if not used for anything else) or record the present count number.
4. wait for the second comparator output.
5. read the timer. If you started it at step 3 it holds the time value, if it was already running, subtract the value found in step 3 to get the difference.
Brian.