just want to say I love this piece of script :)
so long story short:
I have machine with broken BIOS battery. Every time it boots up the date is totally random. In this scenario ddclient will sleep for million of seconds:
-computer boots up, current date is in future
-ddclient starts as daemon, updates dyndns, etc...
-meanwhile ntpd starts and sets up correct date
-ddclint will sleep for millions of seconds
reproduce: ddclient in daemon mode, any version, any perl version
Perl function sleep returns number of seconds actually slept so this line
$left -= sleep $delay;
will put it in sleep for 7 millions seconds or so.
I attached a patch file, one extra if block will not kill performance and makes sure that ddclient will not sleep more than should :)