Jan Birke wrote: > Getting the time offset in nanoseconds works fine, but how do I actually > calculate my global time?
local time + offset = global time > Currently I read my clock with clock_gettime(CLOCK_REALTIME, &clocktime) Provided by Xenomai's POSIX skin or by normal Linux? > und calculate the offset on that time. But that does not seem correct, I > have time differences of about 20 seconds. > I also played around with manipulating the system time, but the offset > displayed in tdma-api.c example did not change, it was always around 130 > seconds. > So what would be the right method obtaining the current system time and Use the real-time extension to get this time, check its documentation for the appropriate function. > where does RTnet get time information from? RTnet bases the offset on the RTOS'es real-time clock, because that is the reference for all timed operations the RTOS API provides. This might be a bit too general. Posting your code (relevant parts) and describing your setup in more details may help to become more concrete. Jan
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________ RTnet-users mailing list RTnet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rtnet-users