Lines Matching full:bt

216 bintime_add_tc_delta(struct bintime *bt, uint64_t scale,  in bintime_add_tc_delta()  argument
224 bt->sec += x >> 32; in bintime_add_tc_delta()
225 bintime_addx(bt, x << 32); in bintime_add_tc_delta()
226 bintime_addx(bt, (scale & 0xffffffff) * delta); in bintime_add_tc_delta()
228 bintime_addx(bt, scale * delta); in bintime_add_tc_delta()
239 bintime_off(struct bintime *bt, u_int off) in bintime_off() argument
250 *bt = *btp; in bintime_off()
257 bintime_add_tc_delta(bt, scale, large_delta, delta); in bintime_off()
292 fbclock_binuptime(struct bintime *bt) in fbclock_binuptime() argument
295 GETTHBINTIME(bt, th_offset); in fbclock_binuptime()
301 struct bintime bt; in fbclock_nanouptime() local
303 fbclock_binuptime(&bt); in fbclock_nanouptime()
304 bintime2timespec(&bt, tsp); in fbclock_nanouptime()
310 struct bintime bt; in fbclock_microuptime() local
312 fbclock_binuptime(&bt); in fbclock_microuptime()
313 bintime2timeval(&bt, tvp); in fbclock_microuptime()
317 fbclock_bintime(struct bintime *bt) in fbclock_bintime() argument
320 GETTHBINTIME(bt, th_bintime); in fbclock_bintime()
326 struct bintime bt; in fbclock_nanotime() local
328 fbclock_bintime(&bt); in fbclock_nanotime()
329 bintime2timespec(&bt, tsp); in fbclock_nanotime()
335 struct bintime bt; in fbclock_microtime() local
337 fbclock_bintime(&bt); in fbclock_microtime()
338 bintime2timeval(&bt, tvp); in fbclock_microtime()
342 fbclock_getbinuptime(struct bintime *bt) in fbclock_getbinuptime() argument
345 GETTHMEMBER(bt, th_offset); in fbclock_getbinuptime()
351 struct bintime bt; in fbclock_getnanouptime() local
353 GETTHMEMBER(&bt, th_offset); in fbclock_getnanouptime()
354 bintime2timespec(&bt, tsp); in fbclock_getnanouptime()
360 struct bintime bt; in fbclock_getmicrouptime() local
362 GETTHMEMBER(&bt, th_offset); in fbclock_getmicrouptime()
363 bintime2timeval(&bt, tvp); in fbclock_getmicrouptime()
367 fbclock_getbintime(struct bintime *bt) in fbclock_getbintime() argument
370 GETTHMEMBER(bt, th_bintime); in fbclock_getbintime()
389 binuptime(struct bintime *bt) in binuptime() argument
392 GETTHBINTIME(bt, th_offset); in binuptime()
398 struct bintime bt; in nanouptime() local
400 binuptime(&bt); in nanouptime()
401 bintime2timespec(&bt, tsp); in nanouptime()
407 struct bintime bt; in microuptime() local
409 binuptime(&bt); in microuptime()
410 bintime2timeval(&bt, tvp); in microuptime()
414 bintime(struct bintime *bt) in bintime() argument
417 GETTHBINTIME(bt, th_bintime); in bintime()
423 struct bintime bt; in nanotime() local
425 bintime(&bt); in nanotime()
426 bintime2timespec(&bt, tsp); in nanotime()
432 struct bintime bt; in microtime() local
434 bintime(&bt); in microtime()
435 bintime2timeval(&bt, tvp); in microtime()
439 getbinuptime(struct bintime *bt) in getbinuptime() argument
442 GETTHMEMBER(bt, th_offset); in getbinuptime()
448 struct bintime bt; in getnanouptime() local
450 GETTHMEMBER(&bt, th_offset); in getnanouptime()
451 bintime2timespec(&bt, tsp); in getnanouptime()
457 struct bintime bt; in getmicrouptime() local
459 GETTHMEMBER(&bt, th_offset); in getmicrouptime()
460 bintime2timeval(&bt, tvp); in getmicrouptime()
464 getbintime(struct bintime *bt) in getbintime() argument
467 GETTHMEMBER(bt, th_bintime); in getbintime()
594 ffclock_convert_delta(ffcounter ffdelta, uint64_t period, struct bintime *bt) in ffclock_convert_delta() argument
600 bintime_clear(bt); in ffclock_convert_delta()
609 bintime_add(bt, &bt2); in ffclock_convert_delta()
627 struct bintime bt, gap_lerp; in ffclock_windup() local
647 ffclock_convert_delta(ffdelta, cest->period, &bt); in ffclock_windup()
648 bintime_add(&ffth->tick_time, &bt); in ffclock_windup()
651 ffclock_convert_delta(ffdelta, ffth->period_lerp, &bt); in ffclock_windup()
652 bintime_add(&ffth->tick_time_lerp, &bt); in ffclock_windup()
663 ffclock_convert_delta(ffdelta, cest->period, &bt); in ffclock_windup()
664 if (bt.sec > 2 * FFCLOCK_SKM_SCALE) in ffclock_windup()
681 ffclock_convert_delta(ffdelta, cest->period, &bt); in ffclock_windup()
682 bintime_add(&ffth->tick_time, &bt); in ffclock_windup()
734 ffclock_convert_delta(ffdelta, cest->period, &bt); in ffclock_windup()
735 polling = bt.sec; in ffclock_windup()
736 bt.sec = 0; in ffclock_windup()
737 bt.frac = 5000000 * (uint64_t)18446744073LL; in ffclock_windup()
738 bintime_mul(&bt, polling); in ffclock_windup()
739 if (bintime_cmp(&gap_lerp, &bt, >)) in ffclock_windup()
740 gap_lerp = bt; in ffclock_windup()
812 ffclock_last_tick(ffcounter *ffcount, struct bintime *bt, uint32_t flags) in ffclock_last_tick() argument
825 *bt = ffth->tick_time_lerp; in ffclock_last_tick()
827 *bt = ffth->tick_time; in ffclock_last_tick()
840 ffclock_convert_abs(ffcounter ffcount, struct bintime *bt, uint32_t flags) in ffclock_convert_abs() argument
860 *bt = ffth->tick_time_lerp; in ffclock_convert_abs()
863 *bt = ffth->tick_time; in ffclock_convert_abs()
868 bintime_add(bt, &bt2); in ffclock_convert_abs()
870 bintime_sub(bt, &bt2); in ffclock_convert_abs()
881 ffclock_convert_diff(ffcounter ffdelta, struct bintime *bt) in ffclock_convert_diff() argument
890 ffclock_convert_delta(ffdelta, ffth->cest.period, bt); in ffclock_convert_diff()
921 binuptime(struct bintime *bt) in binuptime() argument
924 binuptime_fromclock(bt, sysclock_active); in binuptime()
942 bintime(struct bintime *bt) in bintime() argument
945 bintime_fromclock(bt, sysclock_active); in bintime()
963 getbinuptime(struct bintime *bt) in getbinuptime() argument
966 getbinuptime_fromclock(bt, sysclock_active); in getbinuptime()
984 getbintime(struct bintime *bt) in getbintime() argument
987 getbintime_fromclock(bt, sysclock_active); in getbintime()
1026 struct bintime bt; in dtrace_getnanouptime() local
1028 GETTHMEMBER(&bt, th_offset); in dtrace_getnanouptime()
1029 bintime2timespec(&bt, tsp); in dtrace_getnanouptime()
1051 struct bintime bt; in sysclock_getsnapshot() local
1090 bt.sec = time_esterror / 1000000; in sysclock_getsnapshot()
1091 bt.frac = ((time_esterror - bt.sec) * 1000000) * in sysclock_getsnapshot()
1093 clock_snap->fb_info.error = bt; in sysclock_getsnapshot()
1107 ffclock_convert_delta(ffcount, cest.period, &bt); in sysclock_getsnapshot()
1109 bintime_mul(&bt, cest.errb_rate * (uint64_t)18446744073709ULL); in sysclock_getsnapshot()
1111 bintime_addx(&bt, cest.errb_abs * (uint64_t)18446744073ULL); in sysclock_getsnapshot()
1112 clock_snap->ff_info.error = bt; in sysclock_getsnapshot()
1121 sysclock_snap2bintime(struct sysclock_snap *cs, struct bintime *bt, in sysclock_snap2bintime() argument
1132 *bt = cs->fb_info.tick_time; in sysclock_snap2bintime()
1136 bintime_addx(bt, cs->fb_info.th_scale * cs->delta); in sysclock_snap2bintime()
1140 bintime_add(bt, &boottimebin); in sysclock_snap2bintime()
1146 *bt = cs->ff_info.tick_time_lerp; in sysclock_snap2bintime()
1149 *bt = cs->ff_info.tick_time; in sysclock_snap2bintime()
1156 bintime_add(bt, &bt2); in sysclock_snap2bintime()
1161 bt->sec -= cs->ff_info.leapsec_adjustment; in sysclock_snap2bintime()
1165 bintime_sub(bt, &ffclock_boottime); in sysclock_snap2bintime()
1294 struct bintime bt, bt2; in tc_setclock() local
1296 timespec2bintime(ts, &bt); in tc_setclock()
1301 bintime_sub(&bt, &bt2); in tc_setclock()
1304 tc_windup(&bt); in tc_setclock()
1363 struct bintime bt; in tc_windup() local
1427 bt = th->th_offset; in tc_windup()
1428 bintime_add(&bt, &th->th_boottime); in tc_windup()
1429 i = bt.sec - tho->th_microtime.tv_sec; in tc_windup()
1435 t = bt.sec; in tc_windup()
1436 ntp_update_second(&th->th_adjustment, &bt.sec); in tc_windup()
1437 if (bt.sec != t) in tc_windup()
1438 th->th_boottime.sec += bt.sec - t; in tc_windup()
1446 th->th_bintime = bt; in tc_windup()
1447 bintime2timeval(&bt, &th->th_microtime); in tc_windup()
1448 bintime2timespec(&bt, &th->th_nanotime); in tc_windup()
1783 struct bintime bt; in pps_event() local
1807 bt = capth->th_bintime; in pps_event()
1862 bintime_addx(&bt, capth_scale * tcount); in pps_event()
1863 bintime2timespec(&bt, tsp); in pps_event()
1875 bt = pps->capffth->tick_time; in pps_event()
1876 ffclock_convert_delta(tcount, pps->capffth->cest.period, &bt); in pps_event()
1877 bintime_add(&bt, &pps->capffth->tick_time); in pps_event()
1879 bintime2timespec(&bt, tsp_ffc); in pps_event()