/* Update the timestamp and sizestamp to use for rate limit calculations.  */
void Curl_ratelimit(struct Curl_easy *data, struct curltime now)
/* Update the timestamp and sizestamp to use for rate limit calculations.  */
void Curl_ratelimit(struct Curl_easy *data, struct curltime now)
{
  if(data->set.max_recv_speed > 0) {
    if(Curl_timediff(now, data->progress.dl_limit_start) >=
       MIN_RATE_LIMIT_PERIOD) {
      data->progress.dl_limit_start = now;
      data->progress.dl_limit_size = data->progress.downloaded;
    }
  }
  if(data->set.max_send_speed > 0) {
    if(Curl_timediff(now, data->progress.ul_limit_start) >=
       MIN_RATE_LIMIT_PERIOD) {
      data->progress.ul_limit_start = now;
      data->progress.ul_limit_size = data->progress.uploaded;
    }
  }
}