Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Implementation of setTimeout() function in JavaScript
Perl
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/Fork
t
xt
.gitignore
.shipit
Changes
MANIFEST
MANIFEST.SKIP
Makefile.PL
README.mkdn

README.mkdn

NAME

Fork::setTimeout - Implementation of setTimeout() function in JavaScript

SYNOPSIS

use Fork::setTimeout;

my $timer = setTimeout(sub { ... }, 10); clearTimeout($timer);

DESCRIPTION

An emulation of setTimeout() funcion in JavaScript using fork(2).

METHODS

setTimeout( I<$code>, I<$msec> )

my $timer = setTimeout(sub { ... }, 10);

Dispatches $code after $msec micro seconds.

You should store the return value, $timer, in some lexical variable to wait for child process to finish dispatching $code.

clearTimeout( I<$timer> )

clearTimeout($timer);

Kills the child process and clear $timer out.

AUTHOR

Kentaro Kuribayashi kentarok@gmail.com

SEE ALSO

LICENSE

Copyright (C) Kentaro Kuribayashi

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Something went wrong with that request. Please try again.