diff options
Diffstat (limited to 'plugins/utils.c')
-rw-r--r-- | plugins/utils.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/utils.c b/plugins/utils.c index c2261dc3..518caa8c 100644 --- a/plugins/utils.c +++ b/plugins/utils.c | |||
@@ -287,6 +287,16 @@ delta_time (struct timeval tv) | |||
287 | 287 | ||
288 | 288 | ||
289 | 289 | ||
290 | long | ||
291 | deltime (struct timeval tv) | ||
292 | { | ||
293 | struct timeval now; | ||
294 | gettimeofday (&now, NULL); | ||
295 | return (now.tv_sec - tv.tv_sec)*1000000 + now.tv_usec - tv.tv_usec; | ||
296 | } | ||
297 | |||
298 | |||
299 | |||
290 | 300 | ||
291 | void | 301 | void |
292 | strip (char *buffer) | 302 | strip (char *buffer) |