Getting the time offset in nanoseconds works fine, but how do I actually calculate my global time? Currently I read my clock with clock_gettime(CLOCK_REALTIME, &clocktime) 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 where does RTnet get time information from?

Jan

Am 22.11.2007 um 08:13 schrieb Jan Kiszka:

Jan Birke wrote:
Hi,

I have to access the global time provided by RTnet. Is the only
possibility of getting this information waiting for the next TDMA cycle
as described in the tdma-api.c example? Or is the local clock offset
also stored somewhere else?

RTMAC_RTIOC_TIMEOFFSET might provide what you are looking for. Check
rtmac.h.

To get this waitinfo, I have to use the "TDMA0" device?

Yes. TDMA<x> refers to the rteth<x> interface on which RTmac/TDMA is
enabled. Most often this is rteth0, thus TDMA0.

Jan


Attachment: PGP.sig
Description: This is a digitally signed message part

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to