diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2001-12-11 20:56:02 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2001-12-11 20:56:02 (GMT) |
commit | aec064a280cc591a952d4ce1b06613d28791f32f (patch) | |
tree | f3ab2864ae8a17a7be68ddc0d0a0fa09744a2c82 /perform/pio_timer.c | |
parent | d28fd08f4a9593bd8bb51ebc17b8b6555b3885cd (diff) | |
download | hdf5-aec064a280cc591a952d4ce1b06613d28791f32f.zip hdf5-aec064a280cc591a952d4ce1b06613d28791f32f.tar.gz hdf5-aec064a280cc591a952d4ce1b06613d28791f32f.tar.bz2 |
[svn-r4697]
Purpose:
Bug Fix
Description:
I wasn't calculating the total time correctly.
Solution:
I had to subtract the previous time from the current time. This
wasn't being done...DOH
Platforms tested:
Linux
Diffstat (limited to 'perform/pio_timer.c')
-rw-r--r-- | perform/pio_timer.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/perform/pio_timer.c b/perform/pio_timer.c index 247b3c3..0bfb96a 100644 --- a/perform/pio_timer.c +++ b/perform/pio_timer.c @@ -111,8 +111,11 @@ set_time(pio_time *pt, timer_type t, int start_stop) struct timeval sys_t; gettimeofday(&sys_t, NULL); - pt->total_time[t] += (double)pt->sys_timer[t].tv_sec + - ((double)pt->sys_timer[t].tv_usec) / MILLISECOND; + pt->total_time[t] = + ((double)sys_t.tv_sec + + ((double)sys_t.tv_usec) / MILLISECOND) - + ((double)pt->sys_timer[t].tv_sec + + ((double)pt->sys_timer[t].tv_usec) / MILLISECOND); } } } |