summaryrefslogtreecommitdiffstats
path: root/tools/lib/io_timer.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-01-12 15:53:43 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-01-12 15:53:43 (GMT)
commit9a4fcb26baa4c1605c8417d55ebb935058c6c6ec (patch)
tree14a3db0320f105c8f1a077fd27631faa08045fee /tools/lib/io_timer.c
parentf2bf0d60a25f4a88d1a26bd95e268adec05eba3c (diff)
downloadhdf5-9a4fcb26baa4c1605c8417d55ebb935058c6c6ec.zip
hdf5-9a4fcb26baa4c1605c8417d55ebb935058c6c6ec.tar.gz
hdf5-9a4fcb26baa4c1605c8417d55ebb935058c6c6ec.tar.bz2
Fix CMake test macros and perform standalone tests
Diffstat (limited to 'tools/lib/io_timer.c')
-rw-r--r--tools/lib/io_timer.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c
index 4ad2423..cb89019 100644
--- a/tools/lib/io_timer.c
+++ b/tools/lib/io_timer.c
@@ -123,14 +123,14 @@ get_timer_type(io_time_t *pt)
#endif
/*
- * Function: set_time
+ * Function: io_time_set
* Purpose: Set the time in a ``io_time_t'' object.
* Return: Pointer to the passed in ``io_time_t'' object if SUCCEED; Null otherwise.
* Programmer: Bill Wendling, 01. October 2001
* Modifications:
*/
io_time_t *
-set_time(io_time_t *pt, timer_type t, int start_stop)
+io_time_set(io_time_t *pt, timer_type t, int start_stop)
{
/* sanity check */
HDassert(pt);
@@ -160,6 +160,10 @@ set_time(io_time_t *pt, timer_type t, int start_stop)
pt->total_time[HDF5_FILE_READ_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_READ_FIXED_DIMS];
}
break;
+#else
+ case MPI_CLOCK:
+ HDfprintf(stderr, "MPI clock set in serial library\n");
+ return NULL;
#endif /* H5_HAVE_PARALLEL */
case SYS_CLOCK:
if (start_stop == TSTART) {
@@ -203,15 +207,18 @@ set_time(io_time_t *pt, timer_type t, int start_stop)
}
/*
- * Function: get_time
+ * Function: io_time_get
* Purpose: Get the time from a ``io_time_t'' object.
* Return: The number of seconds as a DOUBLE.
* Programmer: Bill Wendling, 01. October 2001
* Modifications:
*/
-double
-get_time(io_time_t *pt, timer_type t)
+H5_ATTR_PURE double
+io_time_get(io_time_t *pt, timer_type t)
{
+ /* sanity check */
+ HDassert(pt);
+
return pt->total_time[t];
}