+ if (progress && (eye_candy <= nr_objects)) {
+ fprintf(stderr, "Counting objects...%d\r", nr_objects);
+ if (eye_candy && (50 <= eye_candy_incr)) {
+ struct timeval tv;
+ int time_diff;
+ gettimeofday(&tv, NULL);
+ time_diff = (tv.tv_sec - prev_tv.tv_sec);
+ time_diff <<= 10;
+ time_diff += (tv.tv_usec - prev_tv.tv_usec);
+ if ((1 << 9) < time_diff)
+ eye_candy_incr += 50;
+ else if (50 < eye_candy_incr)
+ eye_candy_incr -= 50;
+ }
+ eye_candy += eye_candy_incr;
+ }