diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-08-28 01:51:58 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-08-28 01:51:58 +0000 |
commit | bb6a82004e0bb8eb4cb40343449039e3d16506f4 (patch) | |
tree | c8ce02be17aeeb7681b52917c20befffe4fdd8c4 /file.h | |
parent | ae53260d0213cb805bcd84ee13045dd1f8a42e9c (diff) |
Don't do file-read progress bar updates with a timeout; instead, update
the progress bar up to 100 times, as we get another percent closer to
completion. That reduces the number of times we run the GTK+ main loop;
that main loop may do a "select()" or "poll()" or FIONREAD "ioctl" to
check for input from the X server, adding to the CPU overhead of reading
a file.
The packet filtering progress bar is already updated in a similar
fashion; make it also do up to 100 updates.
svn path=/trunk/; revision=597
Diffstat (limited to 'file.h')
-rw-r--r-- | file.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* file.h * Definitions for file structures and routines * - * $Id: file.h,v 1.41 1999/08/24 16:27:23 gram Exp $ + * $Id: file.h,v 1.42 1999/08/28 01:51:57 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -63,6 +63,9 @@ typedef struct _capture_file { guint32 esec; /* Elapsed seconds */ guint32 eusec; /* Elapsed microseconds */ guint32 snap; /* Captured packet length */ + gboolean update_progbar; /* TRUE if we should update the progress bar */ + long progbar_quantum; /* Number of bytes read per progress bar update */ + long progbar_nextstep; /* Next point at which to update progress bar */ gchar *iface; /* Interface */ gchar *save_file; /* File that user saved capture to */ int save_file_fd; /* File descriptor for saved file */ |