summaryrefslogtreecommitdiffstats
path: root/test/vfd_swmr_common.c
diff options
context:
space:
mode:
authorraylu-hdf <60487644+raylu-hdf@users.noreply.github.com>2021-04-13 16:48:02 (GMT)
committerGitHub <noreply@github.com>2021-04-13 16:48:02 (GMT)
commitd9e9fe017c8f9a529f967869546d92dba4559b8f (patch)
tree3d280445045b44d7bbec6bd68f79e3fb82e5921a /test/vfd_swmr_common.c
parent4fc1dacf9ef476fc9e1dbcdb2b49167ea04ae31f (diff)
parent95718b27fddb8f5d8fe6216b021acba400407cda (diff)
downloadhdf5-d9e9fe017c8f9a529f967869546d92dba4559b8f.zip
hdf5-d9e9fe017c8f9a529f967869546d92dba4559b8f.tar.gz
hdf5-d9e9fe017c8f9a529f967869546d92dba4559b8f.tar.bz2
Merge pull request #436 from raylu-hdf/raylu_zoo_test
Changed the signal handling to named pipes in the zoo test
Diffstat (limited to 'test/vfd_swmr_common.c')
-rw-r--r--test/vfd_swmr_common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c
index dad9e3d..68e0b9c 100644
--- a/test/vfd_swmr_common.c
+++ b/test/vfd_swmr_common.c
@@ -72,6 +72,15 @@ below_speed_limit(struct timespec *last, const struct timespec *ival)
return result;
}
+/* Sleep for `tenths` tenths of a second. */
+void
+decisleep(uint32_t tenths)
+{
+ uint64_t nsec = tenths * 100 * 1000 * 1000;
+
+ H5_nanosleep(nsec);
+}
+
/* Like vsnprintf(3), but abort the program with an error message on
* `stderr` if the buffer is too small or some other error occurs.
*/