Help for this page

Select Code to Download


  1. or download this
    sub qpush
    {
         my ($self, $time, $eventref) = @_;
         push @{$self}, {time=>$time, event=>$eventref};
    }
    
  2. or download this
    sub qpop
    {
    ...
         my $ref = pop @{$self};
         return $ref->{event};
    }
    
  3. or download this
       # to call it:
    $queue->qinsert($time, $eventref);
    ...
                    }
            }
    }