FreeRTOS TCP/IP with tickcount < 1mS

You can set a hardware time to run at whatever frequency is best for the granularity of your measurements - then read the timer at the measurement point to see how much time elapsed between the two.