> On Sun, Sep 15, 2013 at 6:59 PM, Charles DeRykus
> wrote: left: ", $start+$sleep -time() };
> ...
Actually, this is wrong because if sleep(3) is interrupted by any signal
it
will return, so something like this should work, eg
my $secs_to_sleep = 60;
my $start = time();
my $end = $start + $sec
(DOH - Obviously I was using 10 seconds to test!)
On 16 Sep 2013, at 00:49, "John W. Krahn" wrote:
> Shawn H Corey wrote:
>> On Sun, 15 Sep 2013 13:00:36 -0700
>> Unknown User wrote:
>>
>>> If my perl script has a sleep for say 300 seconds, when the sleep is
>>> being run is there any way i ca
Hi, I might be being a noob but reading the OP, aren't they wanting to call the
value arbitrarily? Meaning, e.g. an Ajax call in a web page could send a
request to find out the time remaining in the sleep.
I guess that the sleep (which will halt the script) needs to be invoked after
forking a
Shawn H Corey wrote:
On Sun, 15 Sep 2013 13:00:36 -0700
Unknown User 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 b
On Sun, 15 Sep 2013 13:00:36 -0700
Unknown User 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
Michael Alipio wrote:
Hi,
Hello,
I have a script that forks a child. at the parent, i have a line that
tells it to sleep for n seconds. Once the 3 seconds have passed, it
will kill the child process.
I noticed that most of the time, sleep doesn't count exact seconds..
most of the time it's l
On Wed, Apr 22, 2009 at 09:27, Michael Alipio wrote:
>
> Hi,
>
> I have a script that forks a child. at the parent, i have a line that tells
> it to sleep for n seconds. Once the 3 seconds have passed, it will kill the
> child process.
>
> I noticed that most of the time, sleep doesn't count exa
Thank You.
-Original Message-
From: Taylor, Andrew (ASPIRE) [mailto:andrew.tayl...@hmrcaspire.com]
Sent: Wednesday, March 04, 2009 3:51 PM
To: beginners@perl.org
Subject: RE: Sleep
>Hi,
>
>How could I introduce a Sleep in Perl? Is there any specific function
>for that
>Hi,
>
>How could I introduce a Sleep in Perl? Is there any specific function
>for that?
>
>regards,
>-ramesh
Yes.
It's called sleep
sleep n - will sleep for n seconds (miss off the number and it'll
sleep until interrupted)
Capgemini is a trading name used by the Capgemini
On Oct 16, 2:09 pm, [EMAIL PROTECTED] (Jenda Krynicky) wrote:
> use FileHandle;
The FileHandle module exists largely for reasons of backward
compatibility.
New code should:
use IO::Handle;
or
use IO::File;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMA
From: [EMAIL PROTECTED]
> I would expect the following script:
>
> use strict;
> use warnings;
> print 8*8;
> sleep 3;
> print 7*7;
>
> To behave as follows.
>
> 1. print 64.
> 2. pause 3 seconds.
> 3. print 49.
>
> Instead the behavior is:
>
> 1. p
On Oct 16, 6:11 am, [EMAIL PROTECTED] (Chas. Owens) wrote:
> On 10/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > I would expect the following script:
>
> > use strict;
> > use warnings;
> > print 8*8;
> > sleep 3;
> > print 7*7;
>
> > To behave as follows.
>
On 10/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I would expect the following script:
>
> use strict;
> use warnings;
> print 8*8;
> sleep 3;
> print 7*7;
>
> To behave as follows.
>
> 1. print 64.
> 2. pause 3 seconds.
> 3. print 49.
>
> Instead t
Try setting buffering off, its probably due to that as it should do a,b,c
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 16 October 2007 02:50
To: beginners@perl.org
Subject: Sleep apnea
I would expect the following script:
use strict;
use warnings
On 02/22/04 05:09, daniel wrote:
Hi helpers,
I'm very new in perl programming(in programming at all acutally) and
wondering about the following piece of code which I was running under
W2K command-line:
print "First";
sleep 2;
print "Second";
I thought the script would print First then wait for 2 s
$| = 1; #Autoflush
print "First";
sleep 2;
print "Second";
-Will
---
Handy Yet Cryptic Code.
Just to Look Cool to Look at and try to decipher without running it.
Windows
perl -e "printf qq.%3i\x20\x3d\x20\x27%c\x27\x09.,$_,$_ for 0x20..0x7e"
Unix
perl -e 'printf
On Dec 28, 2003, at 2:57 AM, Artem Koutchine wrote:
[..]
In order not to waste CPU time and have server do
something usufull (like calculating something) i tried
handling SIGIO, so, when data is available on incoming
connection i handle and when there is no data, server
does its own job. However, i
> -Original Message-
> From: Chad Kellerman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 12, 2002 12:37 PM
> To: [EMAIL PROTECTED]
> Subject: sleep question
>
>
> Greetings,
> I have a script that forks 5 children. I print to
> screen when each
> child gets forked. Unde
> "Lesli" == Lesli Larocco <[EMAIL PROTECTED]> writes:
Lesli> I'm writing a program that will allow users to construct an email message
Lesli> and schedule when the message will be sent (eg for times when the mail
Lesli> server is less busy). I solved the scheduling program by subtracting the
On Fri, 22 Jun 2001, Jerry Preston wrote:
> I have a perl cgi script that works great. I want to put it into and
> endless loop, put my problem is that my page keeps adding onto it's
> self. How do I redisplay the web screen without it adding on to it?
How are you doing this? You probably wan
Thank you. worked like a charm.
On Saturday 16 June 2001 12:52, Me wrote:
> > I am apparently missing something.
>
> Being aware of buffering, I suspect.
>
> Various parts of the 'pipe' between your print
> statements and the final destination do some
> sort of buffering. You can switch some of
> I am apparently missing something.
Being aware of buffering, I suspect.
Various parts of the 'pipe' between your print
statements and the final destination do some
sort of buffering. You can switch some of this
off in perl by specifying:
$| = 1;
22 matches
Mail list logo