Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tarao/perl5-test-mocktime-hires
https://github.com/tarao/perl5-test-mocktime-hires
perl test
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/tarao/perl5-test-mocktime-hires
- Owner: tarao
- License: other
- Created: 2015-03-05T05:55:04.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-02-04T06:54:39.000Z (almost 7 years ago)
- Last Synced: 2024-10-16T05:43:43.295Z (3 months ago)
- Topics: perl, test
- Language: Perl
- Size: 30.3 KB
- Stars: 0
- Watchers: 3
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/tarao/perl5-Test-MockTime-HiRes.svg?branch=master)](https://travis-ci.org/tarao/perl5-Test-MockTime-HiRes)
# NAMETest::MockTime::HiRes - Replaces actual time with simulated high resolution time
# SYNOPSIS
use Test::MockTime::HiRes qw(mock_time);
my $now = time;
mock_time {
time; # == $now;sleep 3; # returns immediately
time; # == $now + 3;
usleep $microsecond;
} $now;# DESCRIPTION
`Test::MockTime::HiRes` is a [Time::HiRes](https://metacpan.org/pod/Time::HiRes) compatible version of
[Test::MockTime](https://metacpan.org/pod/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.# SEE ALSO
[Test::MockTime](https://metacpan.org/pod/Test::MockTime)
[Time::HiRes](https://metacpan.org/pod/Time::HiRes)
# 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