mirror of
https://github.com/apache/nuttx.git
synced 2026-10-03 04:07:55 +00:00
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:
parent
abbfb31a02
commit
f7e3b0fa89
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue