From owner-freebsd-questions Thu Dec 5 10:45: 3 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50CF137B401 for ; Thu, 5 Dec 2002 10:45:00 -0800 (PST) Received: from aberlour1.sirsi.com (aberlour.sirsi.com [150.147.64.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8502043EA9 for ; Thu, 5 Dec 2002 10:44:59 -0800 (PST) (envelope-from erics@sirsi.com) Received: from stlmail.dra.com (stlmail.dra.com [192.65.218.119]) by aberlour1.sirsi.com (8.12.1/8.12.1) with ESMTP id gB5IRpnZ028586 for ; Thu, 5 Dec 2002 12:27:51 -0600 (CST) Received: by stlmail.dra.com with Internet Mail Service (5.5.2656.59) id ; Thu, 5 Dec 2002 12:44:24 -0600 Message-ID: From: Eric Six To: "'freebsd-questions@FreeBSD.ORG'" Subject: Perl question... calculating difference in time.. Date: Thu, 5 Dec 2002 12:44:22 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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