Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Dec 2002 12:44:22 -0600 
From:      Eric Six <erics@sirsi.com>
To:        "'freebsd-questions@FreeBSD.ORG'" <freebsd-questions@FreeBSD.ORG>
Subject:   Perl question... calculating difference in time..
Message-ID:  <DC32C8CEB3F8D311B6B5009027DE5AD505E33F4F@stlmail.dra.com>

next in thread | raw e-mail | index | archive | help
I know this isn't a perl list, but this is a perl on freebsd question! ;)

I have a script that is sorting log files. I want to calculate the total
time between log entrys. Here is the format of the log files:

Dec 05 09:51:48.452 info info.info data
...
Dec 05 09:53:49.543 info info.info data

The output should return something along the lines of: total time between
log entries 02:01:01.091.

I have the time fields pulled out but I cannot figure out how to seprate
them into a calculatable format. And if this was run from after midnight and
the log files rolled back to 23:00, how to calculate this..Any help is much
appreciated!

TIA
Eric

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DC32C8CEB3F8D311B6B5009027DE5AD505E33F4F>