Time:Mock
I read both:
http://search.cpan.org/dist/Time-Mock/lib/Time/Mock.pm
and:
http://search.cpan.org/~ewilhelm/Time-Mock-v0.0.1/lib/Time/Mock.pm#Class_Methods
about this, and although I certainly don't understand most of what is described there, it sounds like it does something different. Namely that it allows you to speed-up or slow-down the system clock, and there appears to be something about alarms in there. It looks like there are issues with child processes and forking too, although they may have corrected that by now (?)
Time::MockTime
I was unable to find anything about this with a quick Google search. Can you please point me to something that gives an overview of it? (Sorry for my new-ness!)
* * *
An Artificial System Clock does something different: it provides you the ability to trick your system into thinking it is a different date-time. Once implemented, you can instantly move the application forward or backward to a date, run some tests to verify that the system does what it's supposed to in that date-time context, and then instantly move the application to a different date-time, verify more application behavior, etc.
The value the TimeChannels service provides is that it keeps the date-time setting in one, shared ("published") location, where multiple parties can subscribe to it. Especially in building a system that interfaces other systems, if all the interfacing systems have implemented the ASC, and are all subscribing to the same ASC channel, then the testers can coordinate date-time jumps by simply changing the ASC value in one location (i.e., TimeChannels.com), and all the interfacing systems suddenly reflect the new date-time.
* * *
I am very interested in your first statement, though, about replacing the globals. Can you please elaborate on that? Do you mean to replace the contents of existing perl library functions like time, localtime, etc.?
Thanks,
John
In reply to Re^2: Artificial System Clock
by JohnBoy
in thread Artificial System Clock
by JohnBoy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |