NAME

Linux::Event::Clock - Cached monotonic time and deadline math for Linux::Event schedulers

VERSION

0.010

SYNOPSIS

use Linux::Event::Clock;

my $clock = Linux::Event::Clock->new;

$clock->tick;
my $deadline = $clock->deadline_after_ms(50);

$clock->tick;
my $now = $clock->now_ns;

if ($deadline <= $now) {
    # due
}

DESCRIPTION

Provides a cached monotonic clock with explicit refresh via tick. Intended for high-performance schedulers that perform many deadline comparisons per loop iteration.

All deadline math is performed in integer nanoseconds.

METHODS

See source for full documentation.

AUTHOR

Joshua Day

LICENSE

Same terms as Perl itself.