Skip to content

Instantly share code, notes, and snippets.

@xaicron
Created February 7, 2011 15:31
Show Gist options
  • Save xaicron/814537 to your computer and use it in GitHub Desktop.
Save xaicron/814537 to your computer and use it in GitHub Desktop.
alarm(2);
$SIG{ALRM} = sub {
warn 0+$!;
};
warn 0+$!;
sleep 4;
warn 0+$!;
alarm(0);
__END__
0 at - line 5.
4 at - line 3.
4 at - line 7.
alarm(2);
$SIG{ALRM} = sub {
warn 0+$!;
};
warn 0+$!;
sleep 4;
warn 0+$!;
alarm(0);
__END__
0 at - line 5.
0 at - line 3.
0 at - line 7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment