patacongo commented on pull request #5421: URL: https://github.com/apache/incubator-nuttx/pull/5421#issuecomment-1030690182
Adding one or not has nothing to do with accuracy. The accuracy will be the same in either case. The only thing that changes in the mean error. If you don't add one, the error will lie in -1 to 0 ticks (which can be fatal). If you do add one, the error will lie within 0 and +1 ticks. Same accuracy. timerfd is newer and perhaps has an error. I am unfamiliar with the design. wdog is 100% correct, if there is a problem with POSIX timers or timerfd, they should be fixed. wdogs should not be changed due to errors in other timers. Here is a two sentence summary that could be used as a comment: "The contract with the use is that the wdog will delay FOR AT LEAST as long as requested, but may delay long due to variety of factors. The wdog has no knowledge of the the phase of the system timer when it is started: The next timer interrupt may occur immediately or may be delayed for almost a full cycle. In order to meet the contract requirement, the requested time is also always incremented by one so that the delay is always at least as long as requested." -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
