[Nagiosplug-checkins] CVS: nagiosplug/plugins utils.c,1.3,1.4
Karl DeBisschop
kdebisschop at users.sourceforge.net
Tue Oct 15 21:57:09 CEST 2002
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory usw-pr-cvs1:/tmp/cvs-serv30931/plugins
Modified Files:
utils.c
Log Message:
start support for gettimeofday and tv_usec
Index: utils.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/utils.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** utils.c 8 Sep 2002 12:05:18 -0000 1.3
--- utils.c 16 Oct 2002 04:56:19 -0000 1.4
***************
*** 317,320 ****
--- 317,333 ----
+ double
+ delta_time (struct timeval *tv)
+ {
+ struct timeval *pt;
+ struct timezone *tz;
+
+ gettimeofday (pt, tz);
+
+ return (pt->tv_sec - tv->tv_sec + (pt->tv_usec - tv->tv_usec) / 1000000);
+ }
+
+
+
void
More information about the Commits
mailing list