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
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
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
-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
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
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
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
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
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
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
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
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
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
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
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
-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
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
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
- 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
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
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
(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: 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
23 matches
Mail list logo