drivers/timers/ptp_clock_dummy: fix the nanoseconds of the monotonic time.

ptp_clock_dummy_getcrosststamp() stored the seconds of the monotonic
clock in the nanoseconds field of the monoraw member, so the
monotonic time of the cross timestamp was wrong. Store the nanoseconds.

Signed-off-by: Daniel P. Carvalho <danieloak@gmail.com>
Assisted-by: Claude:claude-sonnet-5
This commit is contained in:
Daniel P. Carvalho 2026-09-20 13:58:13 -03:00 • committed by Alan C. Assis
parent abbfb31a02
commit f7e3b0fa89

View file

@ -144,7 +144,7 @@ ptp_clock_dummy_getcrosststamp(FAR struct ptp_lowerhalf_s *lower,
clock_gettime(CLOCK_MONOTONIC, &ts);
cts->monoraw.tv_sec = ts.tv_sec;
cts->monoraw.tv_nsec = ts.tv_sec;
cts->monoraw.tv_nsec = ts.tv_nsec;
ptpinfo("ptp_clock_dummy_getcrosststamp sec:%jd, nsec:%ld\n",
(intmax_t)ts.tv_sec, ts.tv_nsec);