jlaitine commented on code in PR #16358:
URL: https://github.com/apache/nuttx/pull/16358#discussion_r2084596202


##########
arch/sim/src/sim/sim_oneshot.c:
##########
@@ -317,7 +317,9 @@ static int sim_start(struct oneshot_lowerhalf_s *lower,
   flags = enter_critical_section();
 
   sim_timer_current(&current);
-  clock_timespec_add(&current, ts, &priv->alarm);
+
+  clock_ticks2time(&priv->alarm,
+                   clock_time2ticks_floor(&current) + clock_time2ticks(ts));

Review Comment:
   This is probably a bit unnecessary. Perhaps I should just simplify this 
patch by removing the "current" and just do "host_gettime(false) / 
NSEC_PER_TICK" ...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to