Klaus Keppler wrote:
>
> Hi,
>
> How can i get the Real Time ( seconds since 1970, time_t) in an
> rt-thread. I need this time as timestamp for my aquired data.
>
> Because the system-time on my rtlinux-box drifts away many seconds the
> day, i would like to get the time from the RealTimeClockChip on the
> processor board, converted to time_t.
>
>
I think that the RealTimeClockChip is potentially as bad as the
system time - both are unstabilised quartz oscillators accurate
to several tens of ppm, and stable to a few tens of ppm - if one is
better than the other, it's pure luck.
See http://www.ntp.org on all this, and on reliable clock sources.
NTP is usually included in Linux distributions, and it can in any case
be
used to remove systematic errors from the system clock.
I have a related problem.
I want to (have to ;-) timetag acquired data with "TAI" (atomic time).
Crudely put,
that is universal time without the leap seconds.
NTP maintains the system clock on UTC, but without a
internal list of leap second history (dynamically maintained),
it is not possible to derive TAI from UTC.
The advantage of TAI is that subtracting two timetags in TAI always
gives elapsed seconds, true down to (sub)second level. Subtracting two
UTC timetags can only be interpreted as elpased seconds if it is
corrected
for leap seconds. Which is anyhow impossible when one of the two
instants
is in the future - leap seconds are introduced on short notice based on
measured drift.
Anyone any software or other sources?
--
Albrecht de Jonge
Space Research Organization Netherlands
mail: P.O.Box 800, 9700 AV Groningen, Netherlands
http://www.sron.nl
fax: +31 50 3634033
phone: +31 50 3634041
-- [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/