Current scope of logging are the seconds since dlm_controld started.
This patch adds nanosecond scope which are requested from the os anyway.
---
 dlm_controld/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlm_controld/main.c b/dlm_controld/main.c
index 8e8d4038..fdfebd1f 100644
--- a/dlm_controld/main.c
+++ b/dlm_controld/main.c
@@ -128,11 +128,13 @@ int do_write(int fd, void *buf, size_t count)
        return 0;
 }
 
+enum { NS_PER_SECOND = 1000000000 };
+
 uint64_t monotime(void)
 {
        struct timespec ts;
        clock_gettime(CLOCK_MONOTONIC, &ts);
-       return ts.tv_sec;
+       return (ts.tv_sec * NS_PER_SECOND)  + ts.tv_nsec;
 }
 
 static void client_alloc(void)
-- 
2.31.1

Reply via email to