(DOH - Obviously I was using 10 seconds to test!) On 16 Sep 2013, at 00:49, "John W. Krahn" <[email protected]> wrote:
> Shawn H Corey wrote: >> On Sun, 15 Sep 2013 13:00:36 -0700 >> Unknown User<[email protected]> wrote: >> >>> If my perl script has a sleep for say 300 seconds, when the sleep is >>> being run is there any way i can find the time remaining in the sleep >>> say by sending a signal? >>> >>> Thanks, >> >> Not directly. You have to record the time before the sleep and then you >> can measure how long the sleep lasted. >> >> my $started_sleep = time; >> sleep 300; >> my $time_asleep = time - $started_sleep; > > Or just: > > my $time_asleep = sleep 300; > > > > John > -- > Any intelligent fool can make things bigger and > more complex... It takes a touch of genius - > and a lot of courage to move in the opposite > direction. -- Albert Einstein > > -- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > http://learn.perl.org/ > > -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
