That's such a wide open question. A lot of it will depend upon what sort of time resolution you are wanting.
Probably the easiest way is to simply look in the example finder. If you go to the path: Hardware Input and Output > DAQmx > Two-Signal Edge-Seperation From there you could use any of the examples in that folder (e.g. Meas Two Edge Seperation.vi).
Another way is if you simply need millisecond resolution then you could use the Tick Count (ms).vi to latch the timestamp when one triggers and then do it for the second line. You could then subtract the time of the second signal from the first and determine the elapsed time.
Either method should work, it just depends upon the desired resolution and accuracy.