NAME
SM::Simulator - Simulator for the SM library
SYNOPSIS
use SM;
my $server = new SM::Server(sub { rand(1) });
my $handle;
$handle = sub {
$server->join_queue(new SM::Client);
SM::Simulator->schedule(
SM::Simulator->now + rand(2) => $handle
);
};
SM::Simulator->schedule( 0.0 => $handle );
SM::Simulator->run(duration => 25.0);
DESCRIPTION
SM::Simulator subclasses the Sim::Dispatcher class and only provides one more subroutine, namely, the log
sub.
METHODS
AUTHOR
Agent Zhang <agentzh@gmail.com>
COPYRIGHT
Copyright 2006 by Agent Zhang. All rights reserved.
This library is free software; you can modify and/or modify it under the same terms as Perl itself.