$Log$
+ Revision 614.92 2004/03/21 22:35:20 error
+ * stress.c: Wait before posting instead of after posting.
+
Revision 614.91 2004/03/21 22:34:41 error
* database_sleepycat.c: emit a panic message when Berkeley DB wants us to
run recovery; should provide a little more detail on the actual error
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
struct timeval tv;
long tstart, tend;
+ /* Wait for a while */
+ sleep(w);
+
gettimeofday(&tv, NULL);
tstart = tv.tv_sec * 1000 + tv.tv_usec / 1000; /* cvt to msec */
/* Select the room to goto */
return NULL;
}
- if (w >= 3) {
- /* Do a status update */
- pthread_mutex_lock(&count_mutex);
- count++;
- pthread_mutex_unlock(&count_mutex);
- fprintf(stderr, "%d of %d - %d%% \r",
- count, total,
- (int)(100 * count / total));
- }
+ /* Do a status update */
+ pthread_mutex_lock(&count_mutex);
+ count++;
+ pthread_mutex_unlock(&count_mutex);
+ fprintf(stderr, "%d of %d - %d%% \r",
+ count, total,
+ (int)(100 * count / total));
gettimeofday(&tv, NULL);
tend = tv.tv_sec * 1000 + tv.tv_usec / 1000; /* cvt to msec */
tend -= tstart;
if (tend < tmin) tmin = tend;
if (tend > tmax) tmax = tend;
trun += tend;
-
- /* Wait for a while */
- sleep(w);
}
end = time(NULL);
pthread_mutex_lock(&output_mutex);