summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e7c0f12)
raw | patch | inline | side by side (parent: e7c0f12)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Sat, 9 Aug 2003 04:12:14 +0000 (04:12 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Sat, 9 Aug 2003 04:12:14 +0000 (04:12 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@670 f882894a-f735-0410-b71e-b25c423dba1c
plugins/utils.c | patch | blob | history | |
plugins/utils.h | patch | blob | history |
diff --git a/plugins/utils.c b/plugins/utils.c
index c2261dc39477d3d140e1a83513257656791082c0..518caa8c3d627e1a94027b821a34e0b0f867a1a7 100644 (file)
--- a/plugins/utils.c
+++ b/plugins/utils.c
+long
+deltime (struct timeval tv)
+{
+ struct timeval now;
+ gettimeofday (&now, NULL);
+ return (now.tv_sec - tv.tv_sec)*1000000 + now.tv_usec - tv.tv_usec;
+}
+
+
+
void
strip (char *buffer)
diff --git a/plugins/utils.h b/plugins/utils.h
index c378e459ab8b8753b6686d7362e3ff438236e247..b763b1e25ffe348ea4d699569f7e37ff3cade57a 100644 (file)
--- a/plugins/utils.h
+++ b/plugins/utils.h
#endif
double delta_time (struct timeval tv);
+long deltime (struct timeval tv);
/* Handle strings safely */