- SEE ALSO
Test::Time::HiRes - drop-in replacement for Test::Time to work with Time::HiRes
# ensure loaded before any code importing functions from Time::HiRes use Test::Time::HiRes time => 123.456789; # Freeze time my $now = time(); my $now_hires = Time::HiRes::time(); # Increment internal time (returns immediately) sleep 1; # seconds usleep 1000; # microseconds # Return internal time incremented by 1.001s my $then = time(); my $then_hires = Time::HiRes::time(); # set/reset time Test::Time::HiRes->set_time( 123.456789 ); Test::Time::HiRes->unimport(); # turn off behaviour
Must be loaded before importing functions from Time::HiRes.
Patches/suggestions very welcome. This was just a quick fix to a problem.
Please report any bugs or feature requests through the issue tracker at https://github.com/mjemmeson/Test-Time-HiRes/issues. You will be notified automatically of any progress on your issue.
This is open source software. The code repository is available for public review and contribution under the terms of the license.
git clone git://github.com/mjemmeson/Test-Time-HiRes.git
Michael Jemmeson <firstname.lastname@example.org>
Gianni Ceccarelli <email@example.com> Theo van Hoesel <Th.J.v.Hoesel+CPAN@gmail.com<gt>
Copyright 2018- Michael Jemmeson
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.