Lines Matching refs:now
165 uint64_t now, duration, last; in bch_time_stats_update() local
169 now = local_clock(); in bch_time_stats_update()
170 duration = time_after64(now, start_time) in bch_time_stats_update()
171 ? now - start_time : 0; in bch_time_stats_update()
172 last = time_after64(now, stats->last) in bch_time_stats_update()
173 ? now - stats->last : 0; in bch_time_stats_update()
188 stats->last = now ?: 1; in bch_time_stats_update()
203 uint64_t now = local_clock(); in bch_next_delay() local
213 if (time_before64(now + NSEC_PER_SEC * 5LLU / 2LLU, d->next)) in bch_next_delay()
214 d->next = now + NSEC_PER_SEC * 5LLU / 2LLU; in bch_next_delay()
216 if (time_after64(now - NSEC_PER_SEC * 2, d->next)) in bch_next_delay()
217 d->next = now - NSEC_PER_SEC * 2; in bch_next_delay()
219 return time_after64(d->next, now) in bch_next_delay()
220 ? div_u64(d->next - now, NSEC_PER_SEC / HZ) in bch_next_delay()