FR24-Bot

 view release on metacpan or  search on metacpan

lib/FR24/Bot.pm  view on Meta::CPAN

    $self->{last_url} = undef;
    $self->{test_mode} = $test_mode;
    $self->update();
    return $self;
  
}

sub _timestamp_milliseconds {
    return int(time * 1000);
}
sub update {
    my $self = shift;
    
    my $timestamp = _timestamp_milliseconds();
    if ($timestamp - $self->{last_updated} < $self->{refresh}) {
        # Update only once per second
        return;
    }
    $self->{last_updated} = $timestamp;
    my $url = $self->{flights_url} . "?time=" . _timestamp_milliseconds();
    $self->{last_url} = $url;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 2.006 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )