#!/usr/bin/perl

$lasttime=-1;

foreach $file (@ARGV)
{
    if (!open(INPUT, "<$file"))
    {
	print STDERR "unable to open file $file\n";
    }
    else
    {
	$line=<INPUT>;
	$line=<INPUT>;
	$line=<INPUT>;
	$line=<INPUT>;
	@dateparts=split /_/, $line;
	$secs=$dateparts[3]*3600+$dateparts[4]*60+$dateparts[5]+$dateparts[6]/1e6;
	if ($lasttime>0)
	{
	    $diff=$secs-$lasttime;
	    print "$diff\n";
	}
	$lasttime=$secs;
    }
}
