Skip Menu |

This queue is for tickets about the Test-MockSleep CPAN distribution.

Report information
The Basics
Id: 120159
Status: new
Priority: 0/
Queue: Test-MockSleep

People
Owner: Nobody in particular
Requestors: ZHENYZ [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.02
Fixed in: (no value)



Subject: with_mocktime mode broken for multiple sleep()
Below script would output with t1 == t2. So only the first sleep() can cause the mocked time() to be advanced into future. Later calls to sleep() have no effect on time() #!/usr/bin/env perl use strict; use warnings; use Test::MockTime; use Test::MockSleep qw(:with_mocktime); my $begin = time(); sleep(10); my $t1 = time(); sleep(10); my $t2 = time(); print $begin, "\n"; print $t1, "\n"; print $t2, "\n";