File: timer.pl

package info (click to toggle)
glogg 0.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 832 kB
  • sloc: cpp: 6,649; sh: 66; perl: 32; sed: 25; makefile: 11
file content (19 lines) | stat: -rwxr-xr-x 513 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl

use Time::Local;

while (<>) {
    chomp;
    print "$_\n";
    if (/^- (\d*):(\d*):(\d*)\.(\d*) /) {
        $time = timelocal($3, $2, $1, (localtime)[3,4,5]) + ($4/1000.0);
        # print "$time\n";
        if (/DEBUG: FullIndexOperation: Starting the count\.\.\./) {
            $startcount = $time;
            print "$startcount\n";
        }
        elsif (/DEBUG: FullIndexOperation: \.\.\. finished counting\./) {
            print "Counting: ",$time-$startcount,"\n";
        }
    }
}