
    #   Scan composite database and report gaps and
    #   out-of-sequence samples.

    require 'csv.pl';

    $last = 0;

    while ($l = <>) {
        chop($l);
        @f = &csv($l);
#       print(join(',', @f) . "\n");
#       $counts = int($f[0] / 100);
        $time = $f[1];

        if ($last != 0) {
            $dt = $time - $last;
            if ($dt != 60) {
                if ($dt < 0) {
                    print("Out of sequence.  Last = $last, current = $time\n");
                } else {
                    print("Gap of $dt seconds between $last and $time\n");
                }
            }
        }
        $last = $time;

    }

