[Rtai] rt_get_real_time_ns brings not what is expected
mantegazza at aero.polimi.it
Thu Mar 31 09:49:50 CEST 2011
Erik Rull wrote:
> Paolo Mantegazza wrote:
>> erik.rull at rdsoftware.de wrote:
>>> Hi Paolo,
>>> this line of code fixes the issue from my side :-)
>>> because the base value was 0 when calling the function.
>>> Thanks for your help.
>>> Best regards,
>> That's OK, you might even setup a long period deamon to that that now
>> and then in order to have any drift corrected.
> What does that mean?
> Will it be a monotonic correction or might I get a "jump back" when
I do not expect anything like that. Just think that to have the real
time RTAI aligns the time of day to the TSC, in an ininterruptible way.
Once the time origin has been set it goes on with using just the TSC.
Linux might do the same, but if you have any other adjustment, e.g. NTP,
then you might will to realign now and then.
>> The point is that, in the author's mind, the first initialization should
>> be native in RTAi if the POSIX real time clock is enabled when
>> configuring RTAI.
>> If not so yet then there is something I forgot to do.
> Best regards,
More information about the Rtai