xref: /glogg/tools/timer.pl (revision 5b29309eaadab82731ae94d0f56499131a41184e)
1#!/usr/bin/perl
2
3use Time::Local;
4
5while (<>) {
6    chomp;
7    print "$_\n";
8    if (/^- (\d*):(\d*):(\d*)\.(\d*) /) {
9        $time = timelocal($3, $2, $1, (localtime)[3,4,5]) + ($4/1000.0);
10        # print "$time\n";
11        if (/DEBUG: FullIndexOperation: Starting the count\.\.\./) {
12            $startcount = $time;
13            print "$startcount\n";
14        }
15        elsif (/DEBUG: FullIndexOperation: \.\.\. finished counting\./) {
16            print "Counting: ",$time-$startcount,"\n";
17        }
18    }
19}
20