diff options
author | Daniel Jacobowitz <dan@debian.org> | 2005-08-02 03:02:05 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2005-08-02 03:02:05 +0000 |
commit | 8f31aaf668842126962a3e4850795aa203af0429 (patch) | |
tree | a47e4a6e118370a938d110e81230c5156734a63f /gdb/remote-m32r-sdi.c | |
parent | 1218a857d6e76779c931684caf58ccac675b761f (diff) | |
download | gdb-8f31aaf668842126962a3e4850795aa203af0429.tar.gz |
Suggested by Shaun Jackman <sjackman@gmail.com>:
* defs.h (print_transfer_performance): Update prototype.
* m32r-rom.c (m32r_load, m32r_upload_command): Use gettimeofday
for print_transfer_performance.
* remote-m32r-sdi.c (m32r_load): Likewise.
* symfile.c (generic_load): Likewise.
(report_transfer_performance): Create a dummy struct timeval.
(print_transfer_performance): Use a more accurate measure
of performance.
Diffstat (limited to 'gdb/remote-m32r-sdi.c')
-rw-r--r-- | gdb/remote-m32r-sdi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c index 4fa797dd168..9471c115381 100644 --- a/gdb/remote-m32r-sdi.c +++ b/gdb/remote-m32r-sdi.c @@ -1213,7 +1213,7 @@ m32r_load (char *args, int from_tty) char *filename; int quiet; int nostart; - time_t start_time, end_time; /* Start and end times of download */ + struct timeval start_time, end_time; unsigned long data_count; /* Number of bytes transferred to memory */ int ret; static RETSIGTYPE (*prev_sigint) (); @@ -1263,7 +1263,7 @@ m32r_load (char *args, int from_tty) error (_("\"%s\" is not an object file: %s"), filename, bfd_errmsg (bfd_get_error ())); - start_time = time (NULL); + gettimeofday (&start_time, NULL); data_count = 0; interrupted = 0; @@ -1349,7 +1349,7 @@ m32r_load (char *args, int from_tty) interrupted = 0; signal (SIGINT, prev_sigint); - end_time = time (NULL); + gettimeofday (&end_time, NULL); /* Make the PC point at the start address */ if (exec_bfd) @@ -1373,8 +1373,8 @@ m32r_load (char *args, int from_tty) printf_unfiltered ("[Starting %s at 0x%lx]\n", filename, entry); } - print_transfer_performance (gdb_stdout, data_count, 0, - end_time - start_time); + print_transfer_performance (gdb_stdout, data_count, 0, &start_time, + &end_time); do_cleanups (old_chain); } |