summaryrefslogtreecommitdiffstats
path: root/plugins/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/utils.c')
-rw-r--r--plugins/utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/utils.c b/plugins/utils.c
index d97ad48..6e52dab 100644
--- a/plugins/utils.c
+++ b/plugins/utils.c
@@ -316,6 +316,19 @@ is_option (char *str)
316 316
317 317
318 318
319double
320delta_time (struct timeval *tv)
321{
322 struct timeval *pt;
323 struct timezone *tz;
324
325 gettimeofday (pt, tz);
326
327 return (pt->tv_sec - tv->tv_sec + (pt->tv_usec - tv->tv_usec) / 1000000);
328}
329
330
331
319 332
320void 333void
321strip (char *buffer) 334strip (char *buffer)