TIMEDELTA(9)
π TIMEDELTA β a HAL Component, bestie π
okay so literally every girl needs to know when her thread is running late, and that's what timedelta is for β it's a LinuxCNC HAL component that measures thread scheduling timing behavior. it's timedelta(9) in the HAL Component section of the manual, and it is so good at its job. β¨
πΈ SYNOPSIS πΈ
loadrt timedelta [count=N|names=name1[,name2...]]
like. load it. that's it. that's the vibe. π«Ά
π¦ FUNCTIONS π¦
timedelta.Nβ the function, she's here, she runs. π
π PINS π
every pin is giving timedelta.N.<something>, where N is the instance number. let's go, one at a time, no skipping, we don't do that here. π
timedelta.N.jitters32 out(default:0) β worst-case scheduling error, in ns. this is the biggest discrepancy between the ideal thread period and the actual time between sequential runs of this component. and because it uses the absolute value of the error, "got run too early" and "got run too late" both show up as positive jitter. no negativity, only magnitude. π€timedelta.N.current-jitters32 out(default:0) β the scheduling error (in ns) of the current invocation. discrepancy between ideal thread period and actual time since the previous run of this component. also absolute value'd, so "got run too early" and "got run too late" both show up as positive jitter. same energy as above but likeβ¦ right now. β°timedelta.N.current-errors32 out(default:0) β same deal, scheduling error (in ns) of the current invocation, discrepancy between ideal thread period and actual time since the previous run of this component β BUT this one does not use the absolute value, so "got run too early" shows up as negative error and "got run too late" shows up as positive error. she has range. she's complex. we love her. πtimedelta.N.mins32 out(default:0) β the minimum time (in ns) between sequential runs of this component. the record for "fastest again". πβοΈtimedelta.N.maxs32 out(default:0) β the maximum time (in ns) between sequential runs of this component. the record for "took the longest nap". π€timedelta.N.resetbit inβ set this pin to True, then back to False, to reset some of the statistics. note: some. not all. character development arc. π§timedelta.N.outs32 outβ time (in ns) since the previous run of this component. ideally this should equal the thread period, and when it does? perfection. β¨timedelta.N.errs32 out(default:0) β cumulative time error (in ns). and ok the original docs say it's "probably not useful" and I'm gonna keep it real with you, bestie β probably not useful. πtimedelta.N.avg-errfloat out(default:0) β the average scheduling error (in ns). the mean girl of errors. π
π AUTHOR π
Jeff Epler
π LICENSE π
GPL
and that's the whole page, periodt. π this was HAL Component timedelta(9), brought to you by LinuxCNC Documentation, dated 2026-03-17. go check your jitter, bestie, and may your thread period always be exactly what you asked for. ππ¦πΈ
π¦ where this page comes from
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms