summaryrefslogtreecommitdiffstats
path: root/hbeat_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'hbeat_test.c')
-rw-r--r--hbeat_test.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/hbeat_test.c b/hbeat_test.c
new file mode 100644
index 0000000..8ea00ee
--- /dev/null
+++ b/hbeat_test.c
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include "hbeat.h"
+
+int
+main(void)
+{
+ hbeat_t hb;
+ int i;
+ int timeout_max = 10;
+
+ hb = hbeat_init("link-13", timeout_max);
+
+ for (i = 0; i < 10; i++) {
+ printf("hbeat() = %d\n", hbeat(hb));
+ sleep(1);
+ }
+
+ hbeat_free(hb);
+
+ return 0;
+}
+
+
+