]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When converting ns,us,ms to sbt, return the ceil() of the result
authorWarner Losh <imp@FreeBSD.org>
Thu, 15 Nov 2018 16:02:13 +0000 (16:02 +0000)
committerWarner Losh <imp@FreeBSD.org>
Thu, 15 Nov 2018 16:02:13 +0000 (16:02 +0000)
commit023b87bffab7da449530ef4831ec828ee82e6895
tree2de251d089481d5de3f451cbf67a4d3a9846380a
parentee7eba240b5447bfb38c7221103d23080d657b53
When converting ns,us,ms to sbt, return the ceil() of the result
rather than the floor(). Returning the floor means that
sbttoX(Xtosbt(y)) != y for almost all values of y.  In practice, this
results in a difference of at most 1 in the lsb of the sbintime_t.
This difference is meaningless for all current users of these
functions, but is important for the newly introduced sysctl conversion
routines which implicitly rely on the transformation being idempotent.

Sponsored by: Netflix, Inc
sys/sys/time.h