aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-09-05 23:08:59 +0200
committerAlexander Couzens <lynxis@fe80.eu>2021-09-23 13:12:34 +0200
commit06929166de7fe181d82d6a7225ffdede7a90120d (patch)
tree03aa01dac504128615b70d6638a1ab81dfd23a82 /include/osmocom
parent53b4bbb955efa32220f4b546b75b414c773e3fe0 (diff)
vty: add vty_out_uptime() print the uptime to the vty
vty_out_uptime() calculates the time difference to a given timespec and print it in a human readable format (days, hours, minutes, seconds) to the vty. Related: OS#5028 Change-Id: I264a3f49096b96646e0a1f5366623ac20d860793
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/vty/vty.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h
index c13f4356..ed9f439c 100644
--- a/include/osmocom/vty/vty.h
+++ b/include/osmocom/vty/vty.h
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <stdbool.h>
+#include <time.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/defs.h>
@@ -219,6 +220,7 @@ bool vty_is_active(struct vty *vty);
int vty_out (struct vty *, const char *, ...) VTY_PRINTF_ATTRIBUTE(2, 3);
int vty_out_va(struct vty *vty, const char *format, va_list ap);
int vty_out_newline(struct vty *);
+int vty_out_uptime(struct vty *vty, const struct timespec *starttime);
int vty_read(struct vty *vty);
//void vty_time_print (struct vty *, int);
void vty_close (struct vty *);