The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Reflex::Timeout - A stand-alone single-shot delayed callback

VERSION

version 0.072

SYNOPSIS

        #!/usr/bin/env perl

        use warnings;
        use strict;

        use Reflex::Timeout;

        my $to = Reflex::Timeout->new(
                delay   => 1,
                on_done => \&handle_timeout,
        );

        Reflex->run_all();
        exit;

        sub handle_timeout {
                print "got timeout\n";
                $to->reset();
        }

DESCRIPTION

Reflex::Timeout invokes a callback after a specified amount of time has elapsed. Timeouts may be stopped, restarted, or reset so they must again wait the full delay period. Resetting is especially useful, for example whenever input arrives.

Public Attributes

delay

Implemented and documented by "delay" in Reflex::Role::Timeout.

Public Callbacks

on_done

Implemented and documented by "cb_timeout" in Reflex::Role::Timeout.

Public Methods

reset

Implemented and documented by "method_reset" in Reflex::Role::Timeout.

start

Implemented and documented by "method_start" in Reflex::Role::Timeout.

stop

Implemented and documented by "method_stop" in Reflex::Role::Timeout.

EXAMPLES

TODO - Link to them.

SEE ALSO

Reflex Reflex::Role Reflex::Role::Interval Reflex::Role::Timeout Reflex::Role::Wakeup Reflex::Interval Reflex::Wakeup

"ACKNOWLEDGEMENTS" in Reflex "ASSISTANCE" in Reflex "AUTHORS" in Reflex "BUGS" in Reflex "BUGS" in Reflex "CONTRIBUTORS" in Reflex "COPYRIGHT" in Reflex "LICENSE" in Reflex "TODO" in Reflex