in reply to Re: Logical ways to calculate being within two times
in thread Logical ways to calculate being within two times
To guard against the infinite loop / leapsecond / 59 second minute
my $failsafe = 0; $time += 60 until localtime($time) =~ /$on_at:/ or $failsafe++ > +10_000;
Adjust the failsafe cutoff until its just large enough but not too large :) If it slows down this approach change it :) maybe use strptime
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Logical ways to calculate being within two times
by BrowserUk (Patriarch) on Nov 29, 2016 at 00:12 UTC | |
by stevieb (Canon) on Dec 01, 2016 at 16:22 UTC | |
by BrowserUk (Patriarch) on Dec 01, 2016 at 17:07 UTC | |
by stevieb (Canon) on Dec 01, 2016 at 17:10 UTC |
In Section
Seekers of Perl Wisdom