* Feed-forward difference clock. This should be the preferred way to convert a * time interval in ffcounter values into a time interval in seconds. If a valid * pointer is passed, an upper bound on the error in computing the time interval * in seconds is provided. */
| 129 | * in seconds is provided. |
| 130 | */ |
| 131 | void |
| 132 | ffclock_difftime(ffcounter ffdelta, struct bintime *bt, |
| 133 | struct bintime *error_bound) |
| 134 | { |
| 135 | ffcounter update_ffcount; |
| 136 | uint32_t err_rate; |
| 137 | |
| 138 | ffclock_convert_diff(ffdelta, bt); |
| 139 | |
| 140 | if (error_bound) { |
| 141 | do { |
| 142 | update_ffcount = ffclock_estimate.update_ffcount; |
| 143 | err_rate = ffclock_estimate.errb_rate; |
| 144 | } while (update_ffcount != ffclock_estimate.update_ffcount); |
| 145 | |
| 146 | ffclock_convert_diff(ffdelta, error_bound); |
| 147 | /* 18446744073709 = int(2^64/1e12), err_bound_rate in [ps/s] */ |
| 148 | bintime_mul(error_bound, err_rate * (uint64_t)18446744073709LL); |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | /* |
| 153 | * Create a new kern.sysclock sysctl node, which will be home to some generic |
no test coverage detected