Test::MockTime::HiRes3pm
Replaces actual time with simulated high resolution time
Usage
use Test::MockTime::HiRes qw(mock_time);my $now = time;mock_time {time; # == $now;sleep 3; # returns immediatelytime; # == $now + 3;usleep $microsecond;} $now;
Overview
"Test::MockTime::HiRes" is a Time::HiRes compatible version of Test::MockTime. You can wait milliseconds in simulated time.
It also provides "mock_time" to restrict the effect of the simulation in a code block.
Releases
Unchanged in 2 releases since Debian 12 (Bookworm).