Lines Matching refs:now
171 uint64_t now, duration, last; in bch_time_stats_update() local
175 now = local_clock(); in bch_time_stats_update()
176 duration = time_after64(now, start_time) in bch_time_stats_update()
177 ? now - start_time : 0; in bch_time_stats_update()
178 last = time_after64(now, stats->last) in bch_time_stats_update()
179 ? now - stats->last : 0; in bch_time_stats_update()
194 stats->last = now ?: 1; in bch_time_stats_update()
210 uint64_t now = local_clock(); in bch_next_delay() local
214 if (time_before64(now + NSEC_PER_SEC, d->next)) in bch_next_delay()
215 d->next = now + NSEC_PER_SEC; in bch_next_delay()
217 if (time_after64(now - NSEC_PER_SEC * 2, d->next)) in bch_next_delay()
218 d->next = now - NSEC_PER_SEC * 2; in bch_next_delay()
220 return time_after64(d->next, now) in bch_next_delay()
221 ? div_u64(d->next - now, NSEC_PER_SEC / HZ) in bch_next_delay()