Skip Menu |
 

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

Report information
The Basics
Id: 91801
Status: open
Priority: 0/
Queue: Test-MockTime

People
Owner: Nobody in particular
Requestors: myrrhlin [...] gmail.com
Cc:
AdminCc:

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



Subject: support for Time::Hires
Date: Thu, 2 Jan 2014 14:47:04 -0500
To: bug-Test-MockTime [...] rt.cpan.org
From: Michael Hamlin <myrrhlin [...] gmail.com>
Download (untitled) / with headers
text/plain 475b
howdy, Test:MockTime is really useful, thank you. unfortunately it doesn't work with Time::HiRes, which we do use in places (this morning's example was getting a hires time for a postgres timestamp). i saw :MockTime works by replacing CORE::time, but naturally :HiRes doesn't use that. It appears to use the system's gettimeofday, and is written in XS, I think. Not sure how to make :MockTime hook into that, but it would be helpful. cheers, and thanks again, michael
Download (untitled) / with headers
text/plain 563b
On Thu Jan 02 14:47:31 2014, myrrhlin@gmail.com wrote: Show quoted text
> i saw :MockTime works by replacing CORE::time, but naturally :HiRes doesn't > use that. It appears to use the system's gettimeofday, and is written in > XS, I think. Not sure how to make :MockTime hook into that, but it would > be helpful.
Hi, I don't have time to add Time::HiRes support at the moment, but you can have a have a look at http://cpansearch.perl.org/src/EWILHELM/Time-Mock-v0.0.2/lib/Time/Mock.pm to have a look at one approach (not sure how complete it is) of mocking another module.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.