The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Local::LockFile::Time - timed lock with an advisory file

SYNOPSIS

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 );

DESCRIPTION

lock( file, epoch => start, duration => seconds )

Writes time into the file.

check( file )

Returns true if time lock is active. Returns false otherwise.

NOTE

See Local::Util