Internally all calculations are performed in nanoseconds, so there's no
drift.

Michael.

S?bastien GAUME ([EMAIL PROTECTED]) wrote:
> Hello,
> 
> I have a question about the "gethrtime" function.
> 
> This function, as said in the man pages, returns the time in
> nanoseconds. Which means that it converts the clock ticks into
> nanoseconds. As the clock period is unfortunately not an integer
> multiple of nanoseconds, the conversion will entail a rounding or
> truncation on the last digit.
> 
> Thus, when you ask a task to be periodic, you give the period in
> nanoseconds and I suppose this value is converted into clock ticks,
> which entails a rouding. Suppose a task is periodic, running in the
> oneshot mode. Periodically, the next wake up date is calculated in clock
> units. Because the period in clock unit is not equal to the period in
> nanoseconds, a drift should be seen, especially after a large number of
> periods.
> 
> In fact, after having done this test, I did not see such a drift. Do not
> think I am disapointed, I'm not ! I would like to know wether I am wrong
> in my assumptions or not, and if not, how the gethrtime function manages
> not to create a drift.
> 
> Thank you
> 
> Sebastien
> 
> -- [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/
-- [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