diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2012-02-28 18:26:34 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2012-02-28 18:26:34 (GMT) |
commit | df6c92e506a81ed0ede7dacc1269d21ae3e0f411 (patch) | |
tree | c67a1ca1bb197289bd955ca4065f0c611dbcdf6e /perform/sio_timer.c | |
parent | 9423da6a4d53cb2eb6c48a9e0d254307bbf8ae9b (diff) | |
download | hdf5-df6c92e506a81ed0ede7dacc1269d21ae3e0f411.zip hdf5-df6c92e506a81ed0ede7dacc1269d21ae3e0f411.tar.gz hdf5-df6c92e506a81ed0ede7dacc1269d21ae3e0f411.tar.bz2 |
[svn-r22004] Reduced warnings and fixed conflicts resulting from including h5tools.h
Tested: local linux
Diffstat (limited to 'perform/sio_timer.c')
-rw-r--r-- | perform/sio_timer.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/perform/sio_timer.c b/perform/sio_timer.c index f188a10..f233de3 100644 --- a/perform/sio_timer.c +++ b/perform/sio_timer.c @@ -39,15 +39,15 @@ sio_time *timer_g; /* timer: global for stub functions */ * Function: sub_time
* Purpose: Struct two time values, and return the difference, in microseconds
*
- * Note that the function assumes that a > b
+ * Note that the function assumes that a > b
* Programmer: Leon Arber, 1/27/06
*/
static double sub_time(struct timeval* a, struct timeval* b)
{
return (((double)a->tv_sec +
((double)a->tv_usec) / MICROSECOND) -
- ((double)b->tv_sec +
- ((double)b->tv_usec) / MICROSECOND));
+ ((double)b->tv_sec +
+ ((double)b->tv_usec) / MICROSECOND));
}
@@ -82,7 +82,7 @@ sio_time_new(void) void
sio_time_destroy(sio_time *pt)
{
- free(pt);
+ HDfree(pt);
/* reset the global timer pointer too. */
timer_g = NULL;
}
@@ -100,15 +100,15 @@ sio_time * set_time(sio_time *pt, timer_type t, int start_stop)
{
if (pt) {
- if (start_stop == START) {
+ if (start_stop == TSTART) {
HDgettimeofday(&pt->sys_timer[t], NULL);
- /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS
- * we compute the time it took to only open the file */
- if(t == HDF5_FINE_WRITE_FIXED_DIMS)
- pt->total_time[HDF5_FILE_WRITE_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_WRITE_FIXED_DIMS]));
- else if(t == HDF5_FINE_READ_FIXED_DIMS)
- pt->total_time[HDF5_FILE_READ_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_READ_FIXED_DIMS]));
+ /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS
+ * we compute the time it took to only open the file */
+ if(t == HDF5_FINE_WRITE_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_WRITE_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_WRITE_FIXED_DIMS]));
+ else if(t == HDF5_FINE_READ_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_READ_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_READ_FIXED_DIMS]));
} else {
@@ -122,12 +122,12 @@ set_time(sio_time *pt, timer_type t, int start_stop) ((double)pt->sys_timer[t].tv_sec +
((double)pt->sys_timer[t].tv_usec) / MICROSECOND);*/
- /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS
- * we compute the time it took to close the file after the last read/write finished */
- if(t == HDF5_GROSS_WRITE_FIXED_DIMS)
- pt->total_time[HDF5_FILE_WRITE_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_WRITE_FIXED_DIMS]));
- else if(t == HDF5_GROSS_READ_FIXED_DIMS)
- pt->total_time[HDF5_FILE_READ_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_READ_FIXED_DIMS]));
+ /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS
+ * we compute the time it took to close the file after the last read/write finished */
+ if(t == HDF5_GROSS_WRITE_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_WRITE_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_WRITE_FIXED_DIMS]));
+ else if(t == HDF5_GROSS_READ_FIXED_DIMS)
+ pt->total_time[HDF5_FILE_READ_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_READ_FIXED_DIMS]));
}
@@ -171,7 +171,7 @@ set_time(sio_time *pt, timer_type t, int start_stop) }
fprintf(output, " %s %s: %.2f\n", msg,
- (start_stop == START ? "Start" : "Stop"),
+ (start_stop == TSTART ? "Start" : "Stop"),
pt->total_time[t]);
}
}
|