sleep oddness

2006-04-05 Thread Steven Manross
Has anyone seen an issue where sleep 1; causes an infinite loop in perl (100% CPU usage -- no movement in the script)? Build 816 in case it matters.. It just started happenning today in a script I wrote a very long time ago and haven't modified in a while. Similarly, running perl from

RE: sleep oddness

2006-04-05 Thread Jan Dubois
On Wed, 05 Apr 2006, Steven Manross wrote: Has anyone seen an issue where sleep 1; causes an infinite loop in perl (100% CPU usage -- no movement in the script)? Build 816 in case it matters.. It just started happenning today in a script I wrote a very long time ago and haven't modified

Re: sleep oddness

2006-04-05 Thread Kevin J. Woolley
Steven Manross wrote: Has anyone seen an issue where sleep 1; causes an infinite loop in perl (100% CPU usage -- no movement in the script)? Build 816 in case it matters.. It just started happenning today in a script I wrote a very long time ago and haven't modified in a while. Similarly

RE: sleep oddness

2006-04-05 Thread Steven Manross
-Original Message- From: Jan Dubois [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 2:24 PM To: Steven Manross; perl-win32-users@listserv.ActiveState.com Subject: RE: sleep oddness On Wed, 05 Apr 2006, Steven Manross wrote: Has anyone seen an issue where sleep 1

RE: Can sleep() be conditional?

2006-02-09 Thread Jones Robert TTMS Contractor
sleep() be conditional? Hello! I was wondering if anyone knows/has had experience with using sleep() in a conditional context. For example... for ($x=0; $x= 10; $x++) { print $x\n; # if x is equal to 5, sleep for 5 seconds if ($x == 5) { sleep(5

Can sleep() be conditional?

2006-02-08 Thread Todd Morrison
Hello! I was wondering if anyone knows/has had experience with using sleep() in a conditional context. For example... for ($x=0; $x= 10; $x++) { print $x\n; # if x is equal to 5, sleep for 5 seconds if ($x == 5) { sleep(5); } } What I wanted to accomplish

RE: Can sleep() be conditional?

2006-02-08 Thread Jan Dubois
On Wed, 08 Feb 2006, Todd Morrison wrote: I was wondering if anyone knows/has had experience with using sleep() in a conditional context. For example... for ($x=0; $x= 10; $x++) { print $x\n; # if x is equal to 5, sleep for 5 seconds if ($x == 5) { sleep(5

RE: Can sleep() be conditional?

2006-02-08 Thread Francis Paulin
To: perl-win32-users@listserv.ActiveState.com Subject: Can sleep() be conditional? Hello! I was wondering if anyone knows/has had experience with using sleep() in a conditional context. For example... for ($x=0; $x= 10; $x++) { print $x\n; # if x is equal to 5, sleep for 5 seconds

Sleep()

2005-01-14 Thread Chris
Is there a way make Perl sleep for less than a full second? I'm using v5.8 on win2k. - Chris ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Sleep()

2005-01-14 Thread Allen, Matthew
sleep EXPR sleep Causes the script to sleep for EXPR seconds, or forever if no EXPR. May be interrupted by sending the process a SIGALRM. Returns the number of seconds actually slept. You probably cannot mix alarm() and sleep() calls, because sleep() is often implemented using alarm(). On some

Re: Sleep()

2005-01-14 Thread Lyle Kopnicky
Chris wrote: Is there a way make Perl sleep for less than a full second? I'm using v5.8 on win2k. - Chris ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Just

RE: Sleep()

2005-01-14 Thread Peter Guzis
use strict; use Time::HiRes 'sleep'; sleep .5; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Chris Sent: Friday, January 14, 2005 1:28 PM To: perl-win32-users Subject: Sleep() Is there a way make Perl sleep for less than a full second? I'm using v5.8

RE: Sleep()

2005-01-14 Thread Jan Dubois
On Fri, 14 Jan 2005, Chris wrote: Is there a way make Perl sleep for less than a full second? I'm using v5.8 on win2k. Win32::Sleep($time); $time is specified in milliseconds. Win32::Sleep() is part of core Perl on Windows and always available. Cheers, -Jan

Re: Sleep()

2005-01-14 Thread $Bill Luebkert
Chris wrote: Is there a way make Perl sleep for less than a full second? I'm using v5.8 on win2k. A couple - Time::HiRes::usleep and Win32::Sleep use strict; use Time::HiRes qw(usleep); my $usecs = 3_750_000; for (1 .. 5) { print sleeping 1\n; usleep ($usecs

RE: Sleep()

2005-01-14 Thread Peter Eisengrein
You might also check out these fine modules: Win32 Time::HiRes -Original Message- From: Allen, Matthew [mailto:[EMAIL PROTECTED] Sent: Friday, January 14, 2005 4:36 PM To: Chris; perl-win32-users Subject: RE: Sleep() sleep EXPR sleep Causes the script to sleep for EXPR

RE: Sleep()

2005-01-14 Thread Jack D.
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Sent: January 14, 2005 2:28 PM To: perl-win32-users Subject: Sleep() Is there a way make Perl sleep for less than a full second? I'm using v5.8 on win2k. How come no one has mentioned

Re: What is the difference between wait and sleep

2005-01-09 Thread $Bill Luebkert
Maxmelbin Neson (RBIN/EDM3) wrote: Hi What is the difference between wait and sleep functions .. Does wait halts the execution of the next line of code until all other child processes are completed ( does it wait until the previous line has finished executing ?) Yes, wait waits

Re: Why does while and sleep work this way

2003-07-30 Thread $Bill Luebkert
Mitch Raful wrote: Can someone explain why the following code works: #!C:\Perl\bin\Perl.exe require disk_perflib; while(1) { sleep(5); print \n; printf %.0d\%, disk_perflib::GetDisk(); } But if I remove the print \n; it won't work. However, I can substitute both the print

Re: Why does while and sleep work this way

2003-07-30 Thread Sisyphus
- Original Message - From: Mitch Raful [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 3:03 PM Subject: Why does while and sleep work this way Can someone explain why the following code works: #!C:\Perl\bin\Perl.exe require disk_perflib; while(1) { sleep(5

Why does while and sleep work this way

2003-07-29 Thread Mitch Raful
Can someone explain why the following code works: #!C:\Perl\bin\Perl.exerequire disk_perflib; while(1) { sleep(5); print "\n"; printf "%.0d\%", disk_perflib::GetDisk();} But if I remove the print "\n"; it won't work. However, I can substitute both t

RE: is there a sleep in milliseconds?

2001-06-24 Thread Joe Schell
lower the priority of the script. This can be done via the task manager or by using the start command. Jack -Original Message- From: Jaime Teng [mailto:[EMAIL PROTECTED]] Hi, Is there a sleep function that would sleep in milliseconds? Actually, I simply like to make my

Re: is there a sleep in milliseconds?

2001-06-24 Thread $Bill Luebkert
(and presumably Win 2000) you can lower the priority of the script. This can be done via the task manager or by using the start command. That's still no excuse for keeping an execution loop in a program with no sleep/wait involved. That would be just plain bad coding to allow such a hard loop

Subject: RE: is there a sleep in milliseconds?

2001-06-24 Thread rothd
Subject: is there a sleep in milliseconds? -Original Message- From: Jaime Teng [mailto:[EMAIL PROTECTED]] Is there a sleep function that would sleep in milliseconds? Actually, I simply like to make my perl script to run using less of the CPU resources and like to introduce some