On Wed, Nov 22, 2000 at 03:19:28PM +0100, [EMAIL PROTECTED] wrote:
> hi,
> 
> I have to use an embedded Pc, a MOPSlcd4. I did the whole development 
> (of a rtp sniffer) on a normal PC as well as the tests. Then, the 
> precision of paquet arrival time is acccurate within the microseconds 
> (on normal PC). after that i did the same (with exactly same 
> application) on the embedded system and i got a time which is accurate 
> within only 10 milliseconds!!! I resume:
> 
> on a normal PC:      12:45:30.146589
> on MOPSlcd4:        12:45:30.140000


Linux timestamps packets with get_fast_time() in the kernel.  True
to its name, get_fast_time() is implemented with a fast method
of determining the current time.  On a CPU with a TSC, it uses
the TSC to get usec resolution, but otherwise it uses xtime,
which is the time at the last 100 Hz clock tick, thus causing
10 msec resolution.  If the kernel used do_gettimeofday() on
a 486 for every packet, network speed would slow down a lot.

This patch will cause a 486 to use do_gettimeofday() instead
of xtime for timestamping packets:

--- linux-2.2.17/kernel/time.c.orig     Wed Nov 22 11:04:19 2000
+++ linux-2.2.17/kernel/time.c  Wed Nov 22 11:17:53 2000
@@ -43,7 +43,7 @@
         *tm=xtime;
 }
 
-void (*do_get_fast_time)(struct timeval *) = do_normal_gettime;
+void (*do_get_fast_time)(struct timeval *) = do_gettimeofday;
 
 /*
  * Generic way to access 'xtime' (the current time of day).




dave...

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to