Remove extra conversion to nanoseconds from ddi_get_lbolt64().

As result this uses one multiplication and shifts instead of one division
and two multiplications.
This commit is contained in:
Alexander Motin 2014-01-03 18:08:31 +00:00
parent 231a0fe857
commit 99e2428636

View File

@ -70,12 +70,13 @@ gethrtime(void) {
#define gethrtime_waitfree() gethrtime()
extern int nsec_per_tick; /* nanoseconds per clock tick */
extern int hz; /* clock ticks per second */
static __inline int64_t
ddi_get_lbolt64(void)
{
return (gethrtime() / nsec_per_tick);
return (((getsbinuptime() >> 16) * hz) >> 16);
}
static __inline clock_t