do_gettimeofday() minimum resolution
Hi ,
I am trying to calculate delay between the two network interfaces
I tried using do_gettimeofday()function
But i am seeing that the resolution what i am getting is around minimumof 10ms
I am trying to calculate this on a MIPS platform
I tried testing it in following way
i am adding portion of code
struct timeval tv1,tv2
do_gettimeofday(&tv1);
udelay(100);
do_gettimeofday(&tv2);
When i tried tv2.tv_sec -tv1.tv_sec as well as tv2.tv_usec -tv1.tv_usec
the value returned is Zero.
The behaviour is the same when applied mdelay(3) instead of udelay in the above snippet.
What is the minimum resolution that i can get ?
if it is less than 10ms how can i get low resolution values
Regards
krishna
Last edited by jrksimha; 08-29-2008 at 05:54 AM.
|