--- Available.pm 2003/10/06 22:32:25 1.9 +++ Available.pm 2003/10/08 19:23:31 1.10 @@ -378,9 +378,12 @@ my $interval = new( start=>'07:00', stop=>'17:00', dayMask=> DAY_WEEKDAY ); - # calculate current availability in seconds + # calculate current uptime availability from now in seconds print $interval->uptime(localtime); + # calculate maximum downtime in seconds from current moment + print $interval->downtime(localtime); + # calculate availablity in seconds from interval of uptime print $interval->interval($utime1,$utime2); @@ -391,12 +394,17 @@ =head1 DESCRIPTION Time::Available is used to calculate availability of some resource if start -end end time of availability is available. That availability is calculated +and end time of availability is supplied. Availability is calculated relative to some interval which is defined when new instance of module is created. Start and end dates must be specified in 24-hour format. You can specify -just hour, hour:minute or hour:minute:seconds format. +just hour, hour:minute or hour:minute:seconds format. Start and end time is +specified in your B. Timestamp, are specified in unix +utime, and module will take care of recalculating (using C and +C when needed). There is one small canvat here: module is assuing +that time you are specifing is in same time zone in which your module is +running (that is from local system). The B parameter is constructed by OR'ing together one or more of the following dayMask constants: @@ -435,7 +443,7 @@ =back -FIXME +They should be self-explainatory. =head2 EXPORT @@ -470,9 +478,10 @@ =head1 SEE ALSO -Time::Avail is CPAN module that started it all. However, it lacked +L is CPAN module that started it all. However, it lacked calculating of availability of some interval and precision in seconds, so -this module was born. +this module was born. It also had some bugs in dayMask which where reported +to author, but his e-mail address bounced. More information about this module might be found on http://www.rot13.org/~dpavlin/projects.html#cpan