Re: Sleep

2013-09-16 Thread Charles DeRykus
> 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

Re: Sleep

2013-09-16 Thread Ed Davis
(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

Re: Sleep

2013-09-16 Thread Ed Davis
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

Re: Sleep

2013-09-15 Thread John W. Krahn
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

Re: Sleep

2013-09-15 Thread Shawn H Corey
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

Re: sleep exactly after n seconds (sleep finishing longer than specified)

2009-04-22 Thread John W. Krahn
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

Re: sleep exactly after n seconds (sleep finishing longer than specified)

2009-04-22 Thread Chas. Owens
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

RE: Sleep

2009-03-04 Thread ramesh.marimuthu
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

RE: Sleep

2009-03-04 Thread Taylor, Andrew (ASPIRE)
>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

Re: Sleep apnea

2007-10-18 Thread [EMAIL PROTECTED]
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

Re: Sleep apnea

2007-10-16 Thread Jenda Krynicky
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

Re: Sleep apnea

2007-10-16 Thread Paul Lalli
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. >

Re: Sleep apnea

2007-10-16 Thread Chas. Owens
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

RE: Sleep apnea

2007-10-16 Thread Andrew Curry
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

Re: sleep under windows cmd

2004-02-22 Thread Randy W. Sims
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

Re: sleep under windows cmd

2004-02-22 Thread WilliamGunther
$| = 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

Re: sleep does not work when SIGIO is handled (O_ASYNC). why?

2003-12-29 Thread drieux
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

RE: sleep question

2002-09-12 Thread Bob Showalter
> -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

Re: sleep problem (which may cause insomnia...)

2001-09-05 Thread Randal L. Schwartz
> "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

Re: sleep

2001-06-22 Thread Brett W. McCoy
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

Re: sleep () and print ()

2001-06-16 Thread Jim Gallott
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

Re: sleep () and print ()

2001-06-16 Thread Me
> 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;