Package DE_EPAGES::Core::API::Alarm
provides functions to interrupt other function based on a timer
@EXPORT_OK |
Functions
Alarm
Use this function to execute a possible long-running procedure. When the specified timeout is reached before the procedure has finished, it calls the OnTimeout handler.
Syntax |
Alarm( %Options ); |
Example |
Alarm( Sub => sub { sleep(30); }, Timeout => 20, OnTimeout => sub { print "timeout\n"; } ); |
Input |
|