This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch releases/13.1
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 167e0418b555340b176e297ce6d51382dfcc00eb
Author: Daniel P. Carvalho <[email protected]>
AuthorDate: Sun Sep 20 13:58:13 2026 -0300

    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 <[email protected]>
    Assisted-by: Claude:claude-sonnet-5
---
 drivers/timers/ptp_clock_dummy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/timers/ptp_clock_dummy.c b/drivers/timers/ptp_clock_dummy.c
index 4ee0513b215..9ffa9b3fb37 100644
--- a/drivers/timers/ptp_clock_dummy.c
+++ b/drivers/timers/ptp_clock_dummy.c
@@ -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);

Reply via email to