diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-11-22 15:49:06 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-11-22 15:49:06 +0100 |
commit | 1f0fbaad004576a7b9350f0a0994889b46428497 (patch) | |
tree | 57af65a3b35f0c414fa3ef6e0c39708753f47833 /bin | |
parent | f96d7c7f0edd3a9b2fd928af452f300559b87266 (diff) |
efa-m: Show delay next to estimated departure time (if available)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/efa-m | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -87,10 +87,7 @@ sub display_result { } printf( - join( q{ }, - "%${line_length[0]}s", - ( map { "%-${_}s" } @line_length[ 1 .. $#line_length ] ) ) - . "\n", + join( q{ }, ( map { "%-${_}s" } @line_length ) ) . "\n", @{$line}[ 0 .. 3 ] ); } @@ -122,6 +119,7 @@ sub show_results { for my $d ( $status->results ) { my $platform = $d->platform; + my $dtime = $d->time; if ( $d->platform_db ) { $platform .= ' (DB)'; @@ -136,8 +134,12 @@ sub show_results { next; } + if ( $d->delay ) { + $dtime .= ' (+' . $d->delay . ')'; + } + push( @output, - [ $d->time, $platform, $d->line, $d->destination, $d->info ] ); + [ $dtime, $platform, $d->line, $d->destination, $d->info ] ); } display_result(@output); |