All of lore.kernel.org
 help / color / mirror / Atom feed
* Questiion on commit: demo/cyclictest: fix time delta calculation
@ 2022-03-04 11:35 Richard Weinberger
  2022-03-04 12:01 ` Bezdeka, Florian
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Weinberger @ 2022-03-04 11:35 UTC (permalink / raw)
  To: xenomai

Hello,

I'm investigating into a cyclictest issue where it reports negative values just like this commit states:
https://source.denx.de/Xenomai/xenomai/-/commit/3069a7bbc48559f4d2a6184d6159b771f193a4e9

Since I'm on Xenomai 3.1.2 the said commit is already included.
But I have a hard time to understand what problem the commit actually fixes.
Why is the old calculation wrong?

PREEMPT_RT's rt-test does it the same way:
https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git/tree/src/include/rt-utils.h#n60

Except that it casts tv_secs/tv_nsecs to int first, which shouldn't make a difference.

Thanks,
//richard


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-03-07 20:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 11:35 Questiion on commit: demo/cyclictest: fix time delta calculation Richard Weinberger
2022-03-04 12:01 ` Bezdeka, Florian
2022-03-04 12:15   ` Richard Weinberger
2022-03-04 17:57     ` Philippe Gerum
2022-03-04 20:09       ` Richard Weinberger
2022-03-06 17:03         ` Philippe Gerum
2022-03-07 20:02           ` Richard Weinberger

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.