diff options
author | Daniel Jacobowitz <drow@false.org> | 2005-08-02 03:02:05 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2005-08-02 03:02:05 +0000 |
commit | 2b71414df9c47e9a1deca9885bf59ecbfa82a0ad (patch) | |
tree | 96f62a4374fb903ff360f9bce3fe841753196869 /gdb/remote-m32r-sdi.c | |
parent | 4bb64c2874fb99d88129a9f329586625f9a2853b (diff) | |
download | gdb-2b71414df9c47e9a1deca9885bf59ecbfa82a0ad.zip gdb-2b71414df9c47e9a1deca9885bf59ecbfa82a0ad.tar.gz gdb-2b71414df9c47e9a1deca9885bf59ecbfa82a0ad.tar.bz2 |
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 4fa797d..9471c11 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); } |