Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Implementation of setTimeout() function in JavaScript

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 xt
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .shipit
Octocat-spinner-32 Changes
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 MANIFEST.SKIP
Octocat-spinner-32 Makefile.PL
Octocat-spinner-32 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.