The conversion error in timer2sbintime() is very high, almost 7% for timers using NOTE_NSECONDS. A nanosecond takes 4.294967296 "sbintimes", but the conversion truncates this to 4 through its multiplication by the constant SBT_1NS. Similar, but much smaller, error is introduced for the NOTE_USECONDS and NOTE_MSECONDS conversions.
A commit references this bug: Author: gibbs Date: Sat Mar 12 23:02:53 UTC 2016 New revision: 296775 URL: https://svnweb.freebsd.org/changeset/base/296775 Log: Provide high precision conversion from ns,us,ms -> sbintime in kevent In timer2sbintime(), calculate the second and fractional second portions of the sbintime separately. When calculating the the fractional second portion, use a 64bit multiply to prevent excess truncation. This avoids the ~7% error in the original conversion for ns, and smaller errors of the same type for us and ms. PR: 198139 Reviewed by: jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D5397 Changes: head/sys/kern/kern_event.c
There is a commit referencing this PR, but it's still not closed and has been inactive for some time. Closing the PR as fixed but feel free to re-open it if the issue hasn't been completely resolved. Thanks