diff options
Diffstat (limited to 'plugins/utils.c')
-rw-r--r-- | plugins/utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/utils.c b/plugins/utils.c index d97ad480..6e52dab7 100644 --- a/plugins/utils.c +++ b/plugins/utils.c @@ -316,6 +316,19 @@ is_option (char *str) +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 strip (char *buffer) |