You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/01/26 03:42:29 UTC

[GitHub] [incubator-nuttx] Donny9 commented on pull request #2740: sched/timer: get the previous reload value correctly

Donny9 commented on pull request #2740:
URL: https://github.com/apache/incubator-nuttx/pull/2740#issuecomment-767276044


   > @Donny9 is this correct?
   > 
   > ```
   >  *   ovalue - A location in which to return the time remaining from the
   >  *     previous timer setting.	 *     previous timer setting.
   > ```
   > 
   > This says "time remaining" not total time.
   > 
   > time remaining make sense to me. total delay does not
   
   https://man7.org/linux/man-pages/man2/timer_settime.2.html. 
   
   If old_value is not NULL, then it points to a buffer that is used to return the previous interval of the timer (in old_value->it_interval) and the amount of time until  the  timer  would  previously have next expired (in old_value->it_value).
   
   so, we can get time remaining by old_value->it_value, get  the previous interval of the timer by old_value->it_interval. And the pt_delay records the interval time.
   


----------------------------------------------------------------
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.

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