From e5eceb3f3cfc5482f1c9e77ffc74b9d217ae6723 Mon Sep 17 00:00:00 2001
From: Ludovic Apvrille <ludovic.apvrille@telecom-paristech.fr>
Date: Wed, 6 Apr 2011 15:58:18 +0000
Subject: [PATCH] Update on debug: printing time

---
 executablecode/src/debug.c | 6 ++++++
 executablecode/src/debug.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/executablecode/src/debug.c b/executablecode/src/debug.c
index 52342d78f5..c858d95c40 100644
--- a/executablecode/src/debug.c
+++ b/executablecode/src/debug.c
@@ -1,8 +1,10 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <time.h>
 
 #include "debug.h"
 
+
 #define DEBUG_ON 1
 #define DEBUG_OFF 2
 
@@ -65,3 +67,7 @@ void debugMsg(char *msg) {
     printf("DT> %s\n", msg);
   }
 }
+
+void debugTime(struct timespec *ts) {
+  printf("DT> sec=%ld nsec=%ld", ts->tv_sec, ts->tv_nsec);
+}
diff --git a/executablecode/src/debug.h b/executablecode/src/debug.h
index f8fb933d27..7ad45e039b 100644
--- a/executablecode/src/debug.h
+++ b/executablecode/src/debug.h
@@ -11,6 +11,7 @@ void debugTwoInts(char *msg, int value1, int value2);
 void debugLong(char *msg, long value);
 void debugInt(char *msg, int value);
 void debugMsg(char *msg);
+void debugTime(struct timespec *ts);
 
 #endif
 
-- 
GitLab