Re: Date::Leapsecond

2002-05-29 Thread Yitzchak Scott-Thoennes
In article <[EMAIL PROTECTED]>, fglock <[EMAIL PROTECTED]> wrote: >SYNOPSIS > > use Date::Leapsecond; > use Time::Local; > > $epoch_2000 = timegm(0,0,0,1,0,2000 - 1900); > $epoch_1990 = timegm(0,0,0,1,0,1990 - 1900); > print "Seconds between years 1990 and 2000 are "; > print Date::Leapsec

Re: Proposed CPAN submission - Time::RateLimit

2002-05-29 Thread Bruce Van Allen
At 3:26 PM -0700 2002-05-29, Jay Soffian wrote: > "BVA" == Bruce Van Allen <[EMAIL PROTECTED]> writes: > >>> I think you meant $t - time; > >BVA> No, I'm fairly sure it works best the way Ilmari wrote it... > >I ran his code. It didn't work. I looked at it, switched it to time - $t, >it worked.

Re: Proposed CPAN submission - Time::RateLimit

2002-05-29 Thread Jay Soffian
"BVA" == Bruce Van Allen <[EMAIL PROTECTED]> writes: >> I think you meant $t - time; BVA> No, I'm fairly sure it works best the way Ilmari wrote it... I ran his code. It didn't work. I looked at it, switched it to time - $t, it worked. BVA> How about: use Time::HiRes qw(time sleep); #

Re: Proposed CPAN submission - Time::RateLimit

2002-05-29 Thread Bruce Van Allen
At 11:46 AM -0700 2002-05-29, Jay Soffian wrote: > "IK" == Ilmari Karonen <[EMAIL PROTECTED]> writes: > >IK> Isn't this rather needlessly complex? > >Nope, not needlessly. > >IK> Essentially the same results can be achieved by simply counting >IK> the (possibly inaccurate) time taken by sleep() a

Re: Proposed CPAN submission - Time::RateLimit

2002-05-29 Thread Jay Soffian
"IK" == Ilmari Karonen <[EMAIL PROTECTED]> writes: IK> Isn't this rather needlessly complex? Nope, not needlessly. IK> Essentially the same results can be achieved by simply counting IK> the (possibly inaccurate) time taken by sleep() as part of the IK> next iteration. Like this: use Time:

Re: Time::RateLimit

2002-05-29 Thread Jay Soffian
"WRW" == William R Ward writes: WRW> [EMAIL PROTECTED] (Fglock) writes: >> Jay Soffian wrote: >> > calibrate();# takes a second or two to complete >> >> You could calibrate when installing the module, maybe. WRW> For years when calling rand() you had to remember to first call WRW> s

Date::Leapsecond

2002-05-29 Thread fglock
SYNOPSIS use Date::Leapsecond; use Time::Local; $epoch_2000 = timegm(0,0,0,1,0,2000 - 1900); $epoch_1990 = timegm(0,0,0,1,0,1990 - 1900); print "Seconds between years 1990 and 2000 are "; print Date::Leapsecond::ut1($epoch_2000) - Date::Leapsecond::ut1($epoch_1990); pri