Date: Sat, 12 Mar 2016 23:03:31 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 198139] timer2sbintime() Loss of precision during conversion Message-ID: <bug-198139-8-8EdSBILWxj@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-198139-8@https.bugs.freebsd.org/bugzilla/> References: <bug-198139-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D198139 --- Comment #1 from commit-hook@freebsd.org --- 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 porti= on, use a 64bit multiply to prevent excess truncation. This avoids the ~7% er= ror in the original conversion for ns, and smaller errors of the same type fo= r 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 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-198139-8-8EdSBILWxj>