Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Data Structure needed for Event Queue

by jarich (Curate)
on May 28, 2002 at 05:10 UTC ( [id://169706]=note: print w/replies, xml ) Need Help??

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);
    ...
                    }
            }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://169706]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-04-19 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found