View | Details | Raw Unified | Return to bug 27048
Collapse All | Expand All

(-)a/misc/migration_tools/rebuild_zebra.pl (-5 / +2 lines)
Lines 836-852 sub pretty_time { Link Here
836
    my $now = time;
836
    my $now = time;
837
    my $elapsed = $now - $start_time;
837
    my $elapsed = $now - $start_time;
838
    local $_ = $elapsed;
838
    local $_ = $elapsed;
839
    my ( $d, $h, $m, $s );
839
    my ( $h, $m, $s );
840
    $s = $_ % 60;
840
    $s = $_ % 60;
841
    $_ /= 60;
841
    $_ /= 60;
842
    $m = $_ % 60;
842
    $m = $_ % 60;
843
    $_ /= 60;
843
    $_ /= 60;
844
    $h = $_ % 24;
844
    $h = $_ % 24;
845
    $_ /= 24;
846
    $d = $_;
847
845
848
    my $now_pretty = POSIX::strftime("%H:%M:%S",localtime($now));
846
    my $now_pretty = POSIX::strftime("%H:%M:%S",localtime($now));
849
    my $elapsed_pretty = $d ? "[$d:$h:$m:$s]" : $h ? "[$h:$m:$s]" : $m ? "[$m:$s]" : "[$s]";
847
    my $elapsed_pretty = sprintf "[%02d:%02d:%02d]",$h,$m,$s;
850
848
851
    return "$now_pretty $elapsed_pretty";
849
    return "$now_pretty $elapsed_pretty";
852
}
850
}
853
- 

Return to bug 27048