Test::MockTime::HiRes(3pm)

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 immediately
        time;    # == $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).

  1. 12–13

License

Copyright (C) INA Lintaro

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Author

INA Lintaro <[email protected]>

From libtest-mocktime-hires-perl 0.08-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.