aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Gediminas Jakutis <gediminas@varciai.lt> 2019-10-24 14:20:49 +0300
committerGravatar Gediminas Jakutis <gediminas@varciai.lt> 2019-10-24 14:20:49 +0300
commit69933c5b521eacd968c4d78ad769ea7a3d6b872f (patch)
tree851b8e5c618f1f1b9666395942ec77e386a274a6 /include
parentab8851b48622dba2d2954306cd48c5c14c91db72 (diff)
downloadlibrin-69933c5b521eacd968c4d78ad769ea7a3d6b872f.tar.gz
librin-69933c5b521eacd968c4d78ad769ea7a3d6b872f.tar.bz2
librin-69933c5b521eacd968c4d78ad769ea7a3d6b872f.zip
diagnostic: print time since program start instead.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'include')
-rw-r--r--include/rin/definitions.h10
-rw-r--r--include/rin/diagnostic.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/include/rin/definitions.h b/include/rin/definitions.h
index 7ba65a6..9995e0f 100644
--- a/include/rin/definitions.h
+++ b/include/rin/definitions.h
@@ -63,4 +63,14 @@ do { \
} \
} while (0)
+/* CLOCK_MONOTONIC is prefered when available, as
+ * it does not suffer from discontinous jumps.
+ * Otherwise use CLOCK_REALTIME as fallback.
+ */
+#if defined CLOCK_MONOTONIC
+# define RIN_CLOCK_WALL_COUNTER CLOCK_MONOTONIC
+#else
+# define RIN_CLOCK_WALL_COUNTER CLOCK_REALTIME
+#endif /* defined CLOCK_MONOTONIC */
+
#endif /* LIBRIN_DEFINITIONS_INCLUDED */
diff --git a/include/rin/diagnostic.h b/include/rin/diagnostic.h
index 128e059..09d2fb9 100644
--- a/include/rin/diagnostic.h
+++ b/include/rin/diagnostic.h
@@ -40,6 +40,7 @@ enum rin_diag_outstream {
rin_diag_info
};
+void rin_diag_init(void);
int rin_diag_flags(int flag, int action);
int rin_diag_set_outstream(enum rin_diag_outstream channel, FILE *stream);