On Thu, Mar 22, 2018, at 5:28 PM, Rene Hopf wrote:
> 
> > On 22. Mar 2018, at 17:00, andy pugh <[email protected]> wrote:
> > 
> >> 
> >> When displaying the time used by peal rime tasks, what are the units?  Are
> >> they ns, or timer ticks?
> > 
> > I believe them to be nanoseconds.
> 
> its CPU cycles. 
> http://linuxcnc.org/docs/2.5/html/hal/basic_hal.html#_hal_components
> I think that should be changed to some unit of time.
> 

Changing to time units may be non-trivial.  We found a long time ago 
(mid-2000's) that the calls to convert from CPU clocks to nano-seconds were 
ridiculously slow.  In many cases, it was taking 10 times longer to compute the 
duration of a HAL function than it took to execute the function itself.  And 
since those HAL pins must be updated for every function call, we just couldn't 
afford the overhead.

I don't recall if the problem was specific to RTAI or if it was more generic.  
I also don't know if it would be an issue in current environments.  If anything 
it's probably worse now, with the introduction of clock-throttling and all the 
other modern power saving stuff that makes modern PC class processors so 
terrible for realtime control.

In hindsight, the pin names should probably have been .ticks and .ticksmax (or 
.clocks and .clockmax) instead of .time and .tmax.

Regards,

-- 
  John Kasunich
  [email protected]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to