While the system clock might fall behind, there are a number of ways to measure elapsed time accurately. Here they are in ascending order of accuracy:
1) Tick Count - Each tick is 1.000686 milliseconds.
2) DAQ-STC counter - The base clock is 20 MHz, thus the finest period of measurement is 50 nanoseconds.
3) NI-TIO counter - The base clock is 80 Mhz, thus the finest period of measurement is 12.5 nanoseconds.
4) RDTSC - Read Timestamp Counter is an assembly instruction which reads timestamps right off the CPU. The period depends on CPU speed (i.e. 1 GHz yields 1 nanosecond period).
Programming #1 requires two calls to Tick Count and a little math. There are shipping DAQ examples that demonstrate how to count events/time with counters, so that addresses #
2 and #3. As for #4, there's an RT shipping example that demonstrates how to use RDTSC. There's also an RT template, which is identical to the RT example I mentioned.
Let me know if you need more info.