* [Xenomai] Timer
@ 2015-06-11 15:31 cristian ramos
2015-06-11 16:47 ` Gilles Chanteperdrix
0 siblings, 1 reply; 2+ messages in thread
From: cristian ramos @ 2015-06-11 15:31 UTC (permalink / raw)
To: xenomai
Hello everybody,
First at all, thank very much for you attention and I would like
receive your help.
I'm working with centos7 and 2.6.4 release. All is working perfect, but
I don't understand because the code below I get a difference of two seconds.
clock_gettime(CLOCK_REALTIME, &ts);
RTIME rtime = rt_timer_read();
cout <<"posix: " << ts.tv_sec << ts.tv_nsec << endl;
cout <<"xeno: "<< rtime << endl;
the result is:
posix: *1434035528*803555763
xeno: *1434035526*522192216
you can see that clock_gettime has two seconds more than rt_timer_read. I'm
using ntp for the synchronization between machines.
Thank you very much for your time and would appreciate any help.
Regards
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai] Timer
2015-06-11 15:31 [Xenomai] Timer cristian ramos
@ 2015-06-11 16:47 ` Gilles Chanteperdrix
0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2015-06-11 16:47 UTC (permalink / raw)
To: cristian ramos; +Cc: xenomai
cristian ramos wrote:
> Hello everybody,
>
> First at all, thank very much for you attention and I would like
> receive your help.
>
> I'm working with centos7 and 2.6.4 release. All is working perfect,
> but
> I don't understand because the code below I get a difference of two
> seconds.
>
> clock_gettime(CLOCK_REALTIME, &ts);
> RTIME rtime = rt_timer_read();
> cout <<"posix: " << ts.tv_sec << ts.tv_nsec << endl;
> cout <<"xeno: "<< rtime << endl;
>
> the result is:
>
> posix: *1434035528*803555763
> xeno: *1434035526*522192216
>
> you can see that clock_gettime has two seconds more than rt_timer_read.
> I'm
> using ntp for the synchronization between machines.
>
> Thank you very much for your time and would appreciate any help.
Oh boy, are there ambiguities between the words "clock" and "timer" this
afternoon.
See:
http://xenomai.org/2014/08/porting-a-linux-application-to-xenomai-dual-kernel/#Timing_services
rt_timer_read() is the same as Xenomai POSIX skin CLOCK_REALTIME.
--
Gilles.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-11 16:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11 15:31 [Xenomai] Timer cristian ramos
2015-06-11 16:47 ` Gilles Chanteperdrix
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.