Lines Matching refs:ns
6 nstime_init(nstime_t *time, uint64_t ns) in nstime_init() argument
9 time->ns = ns; in nstime_init()
16 time->ns = sec * BILLION + nsec; in nstime_init2()
23 return (time->ns); in nstime_ns()
30 return (time->ns / BILLION); in nstime_sec()
37 return (time->ns % BILLION); in nstime_nsec()
51 return ((a->ns > b->ns) - (a->ns < b->ns)); in nstime_compare()
58 assert(UINT64_MAX - time->ns >= addend->ns); in nstime_add()
60 time->ns += addend->ns; in nstime_add()
69 time->ns -= subtrahend->ns; in nstime_subtract()
76 assert((((time->ns | multiplier) & (UINT64_MAX << (sizeof(uint64_t) << in nstime_imultiply()
77 2))) == 0) || ((time->ns * multiplier) / multiplier == time->ns)); in nstime_imultiply()
79 time->ns *= multiplier; in nstime_imultiply()
88 time->ns /= divisor; in nstime_idivide()
95 assert(divisor->ns != 0); in nstime_divide()
97 return (time->ns / divisor->ns); in nstime_divide()