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:
parent
231a0fe857
commit
99e2428636
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user