> Kalyanaraman, Sivakumar (CTS) wrote:
> 
> Hi,
> The documentation for rt_set_oneshot_mode reads - "it must be called
> before calling any time functions"
> then, how do you measure time in the periodic mode ?? what fn is to be
> used ??
> 

Before asking-setting-changing any time RTAI must know the time units it
is using, and they depend on the timer. In oneshot mode they are CPU
freq, for Pentiums and ups, 8254 freq for 486s. In periodic mode the
time unit is the periodic tick. Once you have assigned the clock mode
you get the time by using rt_get_time, RTAI knows what to do.

To convert use nan2count and count2nano.

If you want just an absolute continuously running time base, RTAI
absolute not solar, use rt_get_cpu_time, to get the time in internal
counts, and rt_get_cpu_time_ns, to get it in nanos.

Ciao, Paolo.
-- [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/

Reply via email to