[CRIU] [PATCH v1 4/6] make timediff reusable
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Fri May 27 01:01:48 PDT 2016
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
criu/include/log.h | 3 +++
criu/log.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/criu/include/log.h b/criu/include/log.h
index fe53a7c..8e5ce1e 100644
--- a/criu/include/log.h
+++ b/criu/include/log.h
@@ -2,6 +2,7 @@
#define __CR_LOG_H__
#include <inttypes.h>
+#include <sys/time.h>
#include "criu-log.h"
@@ -38,4 +39,6 @@ static inline int pr_quelled(unsigned int loglevel)
return log_get_loglevel() < loglevel && loglevel != LOG_MSG;
}
+extern void timediff(struct timeval *from, struct timeval *to);
+
#endif /* __CR_LOG_H__ */
diff --git a/criu/log.c b/criu/log.c
index 6c5d807..efa5de6 100644
--- a/criu/log.c
+++ b/criu/log.c
@@ -34,7 +34,7 @@ static struct timeval start;
*/
#define TS_BUF_OFF 12
-static void timediff(struct timeval *from, struct timeval *to)
+void timediff(struct timeval *from, struct timeval *to)
{
to->tv_sec -= from->tv_sec;
if (to->tv_usec >= from->tv_usec)
--
2.5.5
More information about the CRIU
mailing list