summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/IRIS.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-10-05 21:22:10 +0200
committerDaniel Friesel <derf@finalrewind.org>2016-10-05 21:22:10 +0200
commit1bfa77759d8e51e442321d9eb45e488147c8d006 (patch)
tree02eb364a31de9e8230ff34305191aff5b297eb16 /lib/Travel/Status/DE/IRIS.pm
parentd386bd79dd918d72aa89eb8a077714e5a3d0242a (diff)
IRIS: shave off some additional miliseconds
Diffstat (limited to 'lib/Travel/Status/DE/IRIS.pm')
-rw-r--r--lib/Travel/Status/DE/IRIS.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm
index 056fef4..5674d61 100644
--- a/lib/Travel/Status/DE/IRIS.pm
+++ b/lib/Travel/Status/DE/IRIS.pm
@@ -354,7 +354,9 @@ sub get_realtime {
my $result = $self->{departure_by_id}{$id};
- if ( not $result ) {
+ # add_result will return nothing if no ./tl node is present. The ./tl
+ # check here is for optimization purposes.
+ if ( not $result and ( $s->findnodes('./tl') )[0] ) {
$result = $self->add_result( $station, $s );
if ($result) {
$result->set_unscheduled(1);