[Bug 198139] timer2sbintime() Loss of precision during conversion

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Mar 12 23:03:31 UTC 2016


--- Comment #1 from commit-hook at 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

  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


You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list