delta_time = now.value - av->last_update__.value;
delta_avail = (delta_time * ((unsigned long long) av->available_bytes_per_s__) + 500LL) / 1000LL;
av->consumption_since_last_update__ -= delta_avail;
- av->last_update__ = now;
if (av->consumption_since_last_update__ < 0)
{
left_bytes = - av->consumption_since_last_update__;
(unsigned int) av->available_bytes_per_s__,
(unsigned long long) (now.value - av->last_update__.value));
#endif
+ av->last_update__ = now;
}