Timer resolution question
Hello,
I have a project in which I use an external timer module. I want to measure the time that a function takes. I have a function say _time returnTime() which is configured in such a way that it returns a time with 10 microsecond resolution.
In the function that I want to test how long it takes to execute I do something like this:
myFunction()
{
time1 = returnTime();
...
time2 = returnTime();
time_elapsed = time2 - time1;
}When I do this function time elapsed is a value of 5. Is that possible. Since the returnTime() function returns a time with 10 microsecond resolution shouldn't time_elapsed be a value which is a multiple of 10?
