This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How do I measure microseconds?

I am trying to measure, in microseconds, the time it takes for a segment of code to run but I am not sure what a good method/function is to use to do this.

I started with the example code Example_F2802xAdcTempSensor.c.  

I have tried several different methods, the best of which is supposed to me using gettimeofday() which is located in <sys/time.h>.  However, <sys/time.h> does not exist.

Is there a different function or method I should use?  Or is there some way I can include this file?

Thank you very much for your help.