Local::LockFile::Time - timed lock with an advisory file
use Local::LockFile::Time; my $lock = '/lock/file/path'; Local::LockFile::Time->lock( $lock, epoch => 3600, duration => 1200 ); die "locked\n" if my $seconds = Local::LockFile::Time->check( $lock );
Writes time into the file.
Returns true if time lock is active. Returns false otherwise.
See Local::Util
To install Local::Util, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Local::Util
CPAN shell
perl -MCPAN -e shell install Local::Util
For more information on module installation, please visit the detailed CPAN module installation guide.